Change IO Pins of Chip Whisperer

Hello i´m working with the Chip Whisperer Lite and now i want to break off the Arm target and connect my own target.
I use some GPIO´s from my new target to output if i have glitch successe, reset and normal states.
Now i need some Input Pin´s on the Chip Whisperer side.

Can i use the IO´s from CW Lite which are used for Serial Communication(IO1/2 Serial Rx/Tx) or the pdic and pdid pin and reprogram them to input pins? Or are there some unused Pins i can implement/activate for my application? Can i use the API Function “GPIOSettings.tioX *scope.io.tioX” to change the serial rx and tx to High Z input and that´s it??? Or is it easier to use the serial communication and implement it on my custom target?

Thanks and best regards Rik

Hi Rik,

Yup, you can use TIO1-4 as inputs by setting them to "high-z" or None and reading scope.io.tio_states (API — ChipWhisperer 5.6.1 documentation).

Alex

Hi,
I would like to kwon how fast is the value read on the GPIO pin. Does it depends on the Chipwhisperer clock frequency?
Thanks!
ZT

Do you mean reading GPIO states from Python, like this: scope.io.tio_states?
That’s going to be relatively slow and in large part determined by your particular setup. You can time it yourself. (Apologies if I’ve misunderstood the question!)

Yes. I want to use GPIO to start my system. After the system complete the calculation, it will send ack signal through another GPIO pin. I want to check the timing of the operation. Something like this:

scope.io.tio1 = “high_z”
scope.io.tio2 = “1”
while(scope.io.tio1 == False)
 time.sleep(10E-9)
 count = count+1

According to the above answer, this measurement does not seem to be very accurate. Am I right?
Thanks!
ZT

Correct. In the end, whether this is acceptable to you depends how much accuracy you need. Reading the pin state involves reading an FPGA register; IIRC this can be done around every ~100 clock cycles of a 96 MHz clock (don’t quote me on that, but should be ballpark accurate).

Also BTW scope.io.tio1 will always return what you set it to (in this case ‘high_z’); to read the pin’s actual status, use scope.io.tio_states.

Also to chime in for a moment, your code won’t be able to accurately measure this timing either. Even ignoring issues with scheduling/the interpreter/USB, the minimum sleep time is going to be well above 10E-9 seconds. For reference, the minimum sleep time on Windows/Linux is going to be >1ms through time.sleep() and inconsistent.

If you want an accurate measurement of the timing, you’ll either need to modify the FPGA bitstream or the SAM3U firmware to read the two IO pins