Error on the STM32F-03 with CW308 UFO board


#1

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
)



#2

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©/303xB©

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,


#3

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.


#4

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


#5

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,


#6

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


#7

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


#8

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


#9

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


#10

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