Hi all,
i want to use my Husky as a UART trigger on tio4 (which works) and then feed the glitch pulse (after some delay) as a trigger to a picoEMP.
For some reason, routing the glitch output to HS2 (after disabling the low and high power MOSFETS) leads to some errors related to the FE clock. Using the Glitch MCX output works fine.
Here is my code:
import chipwhisperer as cw
try:
if not scope.connectStatus:
scope.con()
except NameError:
scope = cw.scope()
scope.default_setup()
scope.clock.clkgen_src = 'system'
scope.glitch.enabled = True
scope.glitch.clk_src = 'pll'
scope.glitch.output = 'enable_only'
scope.glitch.trigger_src = 'ext_continuous'
#scope.glitch.trigger_src = 'ext_single'
scope.io.glitch_hp = False
scope.io.glitch_lp = False
scope.glitch.ext_offset = 10
# route glitch output to HS2 !! breakes the trace clock for some reason
scope.io.hs2 = "glitch"
scope.glitch.repeat = 3
scope.trigger.triggers = 'tio4'
scope.trigger.module = 'UART'
scope.UARTTrigger.enabled = True
scope.UARTTrigger.baud = 921600
scope.UARTTrigger.set_pattern_match(0, 'a')
scope.UARTTrigger.trigger_source = 0
# seems high, but no ADC gain erros
scope.gain.db = 40
# route trigger output to glitch/trigger MCX connector
scope.io.glitch_trig_mcx = 'trigger'
scope.arm()
Related errors:
(ChipWhisperer TraceWhisperer ERROR|File TraceWhisperer.py:1343) FE clock not present, cannot calculate proper M/D settings
(ChipWhisperer Scope WARNING|File TraceWhisperer.py:1370) Coudln't achieve exact desired frequency (192000000.000000); setting to 191456520.080566 instead.
(ChipWhisperer TraceWhisperer ERROR|File TraceWhisperer.py:2158) SWO clock not locked!
(ChipWhisperer TraceWhisperer ERROR|File TraceWhisperer.py:723) Front-end clock is not alive! Check scope.trace.clock settings.
Configuring the glitch related parameters after the trigger does also not help.
Sometimes, a “trigger too soon error” is raised. However, i don’t know if this could be part of the problem.
I attached the output of scope
for the working case (glitch via MCX) and the broken one (glitch via HS2).
scope_output.zip (3.5 KB)
Thanks for your help in advance,
fm7