Hi to everyone,
I have bought a Husky to start exploring hardware glitching on various processors.
My first project is glitching a serial communication. All the serial requests and responses are handled by the husky. So I have set my husky for triggering on the uart TX line, because this is where I want the glitch offset to start and more specific I want the glitch to happen after a specific request.
So this is how I have it setup
scope.default_setup()
scope.io.tio1 = ‘serial_tx’
scope.io.tio2 = ‘serial_rx’
scope.io.tio3 = ‘gpio_low’
scope.io.glitch_trig_mcx = ‘trigger’
scope.clock.clkgen_src = ‘system’
scope.clock.clkgen_freq = 100e6
scope.clock.adc_mul = 0target = cw.target(scope)
target.baud = 9600
target.flush()scope.trigger.triggers = ‘tio1’
scope.trigger.module = ‘UART’
scope.gain.db = 40scope.glitch.enabled = True
scope.glitch.clk_src = “pll”scope.io.glitch_hp = False
scope.io.glitch_lp = True
scope.io.glitch_trig_mcx = ‘trigger’scope.glitch.output = “enable_only”
scope.glitch.trigger_src = “ext_single”scope.UARTTrigger.enabled = True
scope.UARTTrigger.baud = 9600
scope.UARTTrigger.set_pattern_match(0, b"\x01\x00\x01\x00\xff\x03")
scope.UARTTrigger.trigger_source = 0
I believe that this is correct according to the tutorials in the notebook.
So while I was looking at the husky LEDs i noticed that the glitch never light and since my oscilloscope is not working (bad PSU) i tried to figure out what could cause it.
I tried to print the matched pattern counts and everything is 0. Like nothing matches the pattern.
But the serial communication happens and everything is fine.
print(“pattern counts:”, scope.UARTTrigger.matched_pattern_counts)
So after some noodling around I thought to try and change the trigger module to
scope.trigger.module = ‘basic’
Now the trigger happens but I have no idea if it happens at the correct timing. Well I assume that it happens because the glitch LED lights up momentarily. Also the Armed LED is light up.
So I am wondering if I do something wrong in my setup or this is somekind of a bug or restriction. I have thought various workarounds to solve this issue and some of them are, toggle a pin high when a specific request is sent and monitor that pin back and trigger the glitch or maybe redirect the TX pin to another IO pin which functions as serial and that triggers the glitch? I am not sure and I would like to know your thoughts on this.
Regards
P.S.: I am not sure when I will have my oscilloscope repaired. Waiting for an answer from siglent.