Ret = scope.capture() not working

In SOLN_Fault 2_2 - Voltage Glitching to Bypass Password, my code seems to always be going into the if ret: block. I am never able to get a successful glitch. However, my SOLN_Fault 2_1 - Introduction to Voltage Glitching seems to work very well, the scope.capture() seems to work just fine in. Any fixes?

Hi,

Have you adjusted the width and offset ranges for the glitch based on what you got in Lab 2_1?

Also, if you’re only ever getting resets, that indicates that either the glitch is too powerful or that there is some issue with the target.

Alex

Hi. Yes, I have used the exact same settings that worked for Lab2_1. What do I do if the glitch is too powerful? Although, according to the code flow it seems to be an issue with the capture() function here. Also is there anything else in the hardware I should be doing? The only thing I’ve done is connect the provided cable to between the glitch and vout ports of the two boards

The issue you’re having is that the ChipWhisperer isn’t being triggered. There’s an IO pin that the target sets high which is used to time the glitch. The most likely cause is that something is preventing your target from running properly. This could be caused by the glitch, but it could also be some other issue.

I’d recommend disabling the glitch with scope.io.glitch_disable() and verifying that you can communicate with the target using the simpleserial 'p' command as is done in one of the earlier blocks. If communication does work properly when the glitch is disabled, I’d recommend trying a smaller glitch width.

scope.vglitch_setup(‘lp’) # use both transistors
This line probably was causing the issue, when i changed it to
if scope._is_husky:
scope.glitch.enabled = True
scope.glitch.clk_src = “pll”
else:
scope.glitch.clk_src = “clkgen” # set glitch input clock
scope.glitch.output = “glitch_only” # glitch_out = clk ^ glitch
scope.glitch.trigger_src = “ext_single” # glitch only after scope.arm() called
if PLATFORM == “CWLITEXMEGA”:
scope.io.glitch_lp = True
scope.io.glitch_hp = True
elif PLATFORM == “CWLITEARM”:
scope.io.glitch_lp = True
scope.io.glitch_hp = True
elif PLATFORM == “CW308_STM32F3”:
scope.io.glitch_hp = True
scope.io.glitch_lp = True

And changed a few parameters it seems to have started working