CW Nano: Multiple glitches


I am currently trying to understand whether it is possible to insert more than one glitch within the same code execution with the CW Nano board. I have placed trigger_high() and trigger_low() function calls around the code chunks of interest and I also called scope.glitch.manualTrigger(). However, the manual fault injection does not seem to cause any glitches (with the automatic glitch insertion I succeed with the glitching quite often, targeting the same code area). Moreover, the manualTrigger() function’s implementation is still a little hazy for me.

My questions are:

  1. Does the glitching happen immediately after the trigger_high() is detected?
  2. Is there any way to delay the glitch more, after the trigger_high() happens?
  3. Can I still control the width of the glitch?

Alternatively, is it possible to glitch multiple times using only the repeat and ext_offset settings? If yes, then what do I need to set for ext_offset to have two glitches, one after each trigger_high?

Thanks and best regards.


manualTrigger() should immediately cause a glitch and doesn’t interact with the trigger pin at all. It’s mainly meant for situations where you don’t need precise timing on your glitch, such as trying to glitch out of an infinite loop.

The Nano needs to be rearmed before each glitch i.e. by calling scope.arm(). What you’re looking to do isn’t really possible without making firmware modifications.


Hello Alex,

thank you for your answer. I can make modifications to the firmware. I aim to perform more than one successful glitch within one software execution. What modifications do I need to do to make this possible? I placed a big for loop as a wait between the code sections that I wanted to glitch to give time for a new arm() and after the wait, I called trigger_high() (although I am not sure if this is needed).

On the Python side, do I need to disconnect the scope or is calling arm() again enough? If I call the arm() from where will the ext_offset be considered?

Calling arm after scope.capture() return is sufficient, but you’re unlikely to call arm() again before the next trigger_high() call. The glitch code is here if you’re interested in changing it: