Executing control at the end of Glitch Explorer cycle


I have a target and a microcontroller which generates trigger based on the UART data the target sends. I have a 1.5s interval in which I am interested in finding the last moment in which I can still glitch, as my hypothesis is that it is the one which corresponds to the execution of a specific instruction. The problem is that the target is clocked externally from 27MHz and at this rate CW can only offset from the external trigger by ~37ms (1e6 clk cycle). To overcome this I use a timer in the microcontroller to add extra delay and now I would like to scan the interval automatically.
What would be useful if after the Glitch Explorer iterated through a full set of parameters, I can emit a signal on a GPIO pin of the CW to the mC, to decrement the timer value, and then to restart the capture. Moreover the other parameters of the glitch also seems to change as the target goes on with the execution, and if I find a glitch I am not interested in every combination, so I would like the Glitch Explorer to skip ahead.
I was unable to identify the parts of the source code where I need to add my modification, could you please point me into the right direction?
I already altered the addResponse function in chipwhisperer/software/chipwhisperer/capture/ui/GlitchExplorerDialog.py to query the usb token of the target, but these callback functions are unclear. Do you maybe have a call graph?
In the CW PRO, is this problem solved?

Hi Daniel,

There is not an updated call graph for the ChipWhisperer software. Most of the logic for the Glitch Explorer is in the GlitchExplorerDialog.py. In regards to iterating through the timer value you created, you can script it using the 4.0 api, if you make a custom script and run it in the gui. You can emulate pressing the capture many button using


You could place this inside a loop and change the timer value in the loop
(psuedo code)

time_value = 20 #ms (make sure to register it with the microcontroller)
while time_value > 0
    time_value = time_value - 1 # ms (make sure to register it with the microcontroller)

You will have to find a way to store the results in between runs.

You could also script it completely manually if you need more control, you will not have the gui though. It might be easier to implement partial skipping of a loop based on custom conditions this way. Here are some examples.

I am not sure exactly what you are trying to do, so I am not sure what “other parameters” you are referring to. The “offset” and “width” parameters change when using the glitch explorer are these the ones you mean?

Hopefully this helps alittle. If you tell me exactly what parameters should stay constant and which should vary and elaborate on exactly what you are trying to then I can try to help you further. :slight_smile: