Error on the STM32F-03 with CW308 UFO board

Hi,
I’d like to test using a STM32F-03 with :question: CW308 UFO board.
Whenever I tried to use “Serial STM32F Programmer”, I found some error as below.
How can I fix it?
I saw the WIKI and then I used the same method as the URL.
wiki.newae.com/CW308T-STM32F


An error has occurred:
Can’t read port or timeout (Traceback (most recent call last): File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask ask = self.sp.read(1)[0] IndexError: list index out of range )

It is usually safe to continue, but save your work just in case.
If it persists, try reseting the settings first before creating a new ticket informing the details bellow.



INFO - Assuming appropriate BOOT pins set HIGH on STM32F Hardware now
INFO - Sync failed with error Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)
, retrying…
INFO - Sync failed with error Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)
, retrying…
INFO - Sync failed with error Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)
, retrying…
INFO - Sync failed with error Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)
, retrying…
INFO - Sync failed with error Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)
, retrying…
ERROR - Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/capture/ui/programmers_dialog.py”, line 339, in writeFlash
QCoreApplication.processEvents)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 203, in autoProgram
self.find()
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 147, in find
self.initChip()
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 273, in initChip
return self._wait_for_ask(“Syncro”)
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 249, in _wait_for_ask
raise CmdException(“Can’t read port or timeout (%s)” % traceback.format_exc())
CmdException: Can’t read port or timeout (Traceback (most recent call last):
File “/home/cwuser/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py”, line 247, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
)


Hi all,

I have the same issue when trying to program the CW308-UFO board with the STM32F3 target.
With the STM32 Serial Programmer, I can get the signature by clicking on the “Check Signature” button.
This indicates :

Detected known STMF32: STM32F302xB(C)/303xB(C)

However, when I click on Erase/Program/Verify FLASH, I get the following error message :

An error has occurred:
Can’t read port or timeout (Traceback (most recent call last): File "/home/userlocal/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_stm32fserial.py", line 282, in _wait_for_ask ask = self.sp.read(1)[0] IndexError: list index out of range )

After that, encryption does not work and the device seems to not respond at all. I can see with an oscilloscope that the data is sent on the RX line, but nothing shows up on the TX line, not even the “hello” debug message.

Maybe the CW308 switches are not set correctly, could you confirm me their respective positions ?

Regards,

Hi,

try to enable the slow clock mode in the programmer UI. I typically saw that error happening on Linux systems and the slow clock will wait a bit more for the chip to answer.

Just to follow up regarding the jumpers/switches on the CW308:

  • The 3.3V SRC DIP switch needs to be set to J1/CW (opposite side of 20 pin connector)
  • J3 (By the 20 pin connector) needs a jumper on HS2/OUT
  • J14 (opposite side of 20 pin connector) needs to connect FILT to FILT_HP/FILT_LP (two pins closest to target board)

Let me know if @jmichel or my help solved your issue.

Alex

Hi Alex, hi Jean-Michel,

Thanks for your help ! I did set the switches correctly and then tried to program in “slow” mode. I obtained a message stating :

FLASH Program SUCCEEDED at 10:31:32

However, after I tried to communicate with the STM32 UFO board, still nothing on the TX line, not even the “hello” debug message.
I tried programming the microcontroller with openocd, same issue…
If this is of any help, I noticed that the Status LED on the CW1200 is blinking.

One more thing, I noticed that when I attempt to program the microcontroller, I get the following message :

Attempting to programming 6191 bytes at 0x8000000

However, my HEX file is 18kB.

One last thing, after programming with the STM32 Serial Programmer, when attempting to program with openocd, I get the following info message :

Info : Target voltage: 1.729829

Shouldn’t it be 3.3 ?

Hope these details help,

Hi,

Hex files aren’t a raw binary format (https://en.wikipedia.org/wiki/Intel_HEX), so what ChipWhisperer reports as the size of the binary won’t match up with the actual file size.

The voltage, however, should definitely be 3.3V for the F3. Can you please confirm that:

  • The 20-pin connector is on the right way around (the small protrusion on the cable should face the outside of the board)
  • Try switching J4 (by the 20 pin connector) between J1 and J5.
  • Ensure the 3.3V LED (LED8) is on
  • Ensure J14 has a jumper between FILT and FILT_HP/FILT_LP

Alex

Hi,

I do confirm that all these boxes are ticked. However, I still get the following log message :

WARNING - Response length from target shorter than expected (0<34): "".
WARNING - Timeout in OpenADC capture(), trigger FORCED

Brice

Hi Brice,

If you have a multimeter on hand, can you try measuring the voltage at the J_VREF pin, as well as TP5 (By the Vout SMA connector). I just want to make sure the board is supplied properly before moving on to other causes for the issue.

Alex

Hi Alex,

I have 3.221V on J_VREF and 3.125V on TP5. It seems to indicate that the board is powered fine.

Brice

Hi Brice,

Can you check with your scope that the target is receiving a clock signal? Otherwise, I’m not quite sure what the issue could be.

If it’s a Linux issue as @jmichel suggested, then I have a Linux machine at home I can test with tonight or tomorrow.

Alex

Hi Alex,

I confirm that there is indeed a 7.38MHz clock on the CLK_in pin.
I will try to use a PC running on Windows to program the chip and I will let you know.

Thanks for your help,

Brice

Hi Alex,

I just tried with a Windows PC and still obtained no response from the chip. Do you have any other idea about what might go wrong ?

Brice

I can confirm that I am seeing the same issue. I can program the STM32F successfully, but get the " > WARNING - Timeout in OpenADC capture(), trigger FORCED" error message when trying to capture scope data. No data is transmitted.

I am running through the “Timing Analysis with Power for Password Bypass” tutorial and that works as expected for the XMEGA but not the STM32F.

It seems like the above error may be due to which compiler is used. For Windows, 2018-q1 seems to not work, but 2018-q2 does.