Hi all,
I’ve been trying to set up streaming mode with the CW-Pro again recently and I cannot get it to work.
Here my minimal working example on AES without streaming:
import chipwhisperer as cw
scope = cw.scope()
target = cw.target(scope)
scope.default_setup()
# scope.adc.stream_mode = True
scope.clock.adc_src = "clkgen_x1"
scope.adc.samples = 100000
programmer = cw.programmers.STM32FProgrammer
cw.program_target(scope, programmer, path_to_hex)
target.simpleserial_write("k", bytearray([0x2b, 0x7e, 0x15, 0x16,
0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88,
0x09, 0xcf, 0x4f, 0x3c]))
target.simpleserial_wait_ack()
scope.arm()
target.simpleserial_write("p", bytearray([0x6b, 0xc1, 0xbe, 0xe2,
0x2e, 0x40, 0x9f, 0x96,
0xe9, 0x3d, 0x7e, 0x11,
0x73, 0x93, 0x17, 0x2a]))
response = target.simpleserial_read("r", 16)
scope.capture()
trace = scope.get_last_trace()
However, when I un-comment scope.adc.stream_mode = True
, I get the following error message:
Traceback (most recent call last):
File "test_stream.py", line 25, in <module>
scope.capture()
File "....", line 366, in capture
return self.qtadc.capture(None)
File "...", line 113, in capture
timeout = self.sc.capture(offset, adc_freq, samples)
File "....", line 2607, in capture
scope_logger.warning('Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: %02x'%status)
UnboundLocalError: local variable 'status' referenced before assignment
WARNING:ChipWhisperer NAEUSB:Streaming: USB stream read timed out
Any idea what is missing to get it working ?
Thanks !
Brice