Program Error with CW308 STM32F4

Hi all.

I just executed tutorial code.
However, I failed to program simpleserial-base code on STM32F4.

import chipwhisperer as cw
scope = cw.scope()
scope.clock.clkgen_freq = 8E6
#program target…
cw.program_target(scope, cw.programmers.STM32FProgrammer, “…/chipwhisperer-develop/hardware/victims/firmware/simpleserial-base/simpleserial-base-CW308_STM32F4.hex”)
scope.clock.clkgen_freq = 7.37E6

CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “C:\Users\JongHyeok Lee\anaconda3\lib\site-packages\chipwhisperer\hardware\naeusb\”, line 304, in _wait_for_ask
ask =[0]
IndexError: list index out of range
). Target didn’t respond when an ack was expected.

How can I fix it?

Note: When XMEGA is connected, programming work well.


A few possible causes of this error:

  1. Is the 1.2V LED lit up on the CW308 board? The XMega only requires 3.3V, but the STM32F4 requires both the 3.3V and 1.2V power supplies to be enabled.
  2. Try removing the scope.clock.clkgen_freq=8E6. You can program the F4 at the default frequency.
  3. Try lowering the baud rate when programming the STM. You can do this as follows:
cw.program_target(scope, cw.programmers.STM32FProgrammer, “…/chipwhisperer-develop/hardware/victims/firmware/simpleserial-base/simpleserial-base-CW308_STM32F4.hex”, baud=38400)

If none of this works, can you please send me the ChipWhisperer version that you’re on, the git commit that you’re on (!git log in a Notebook, should be at the top of the output of this), and the firmware version you’re on (scope.fw_version).