1

I built 2 baremetal development boards, both using the STM32F030K6T6. The MCU on one board can be programmed as indicated in the datasheet using the boot pin selection and via USART pins PA14 and PA15. The second does not respond to flashing command and instead keeps sending the same message ST20033000022056000063227OV on the USART TX pin every 5 seconds with a 9600 baud rate.

I was not able to find any references related to this in the datasheet or elsewhere. I could just ditch the board but I'd like to understand what is it that's happening. It seems like the MCU is in some sort of a failure mode. What does the message mean?

I tried flashing using the stm32flash script available in the STM32 library for Arduino. The signal's baud rate was determined using a scope. The messages were then captured with:

cu -l /dev/ttyUSB0 -s 9600

Both MCUs came from the same batch and the development boards have the same aditional components (2 decoupling capacitors, a boot selector jumper and a reset button).

  • 1
    Do you have any st-link debugger or nucleo board with it to program it using SWD instead of bootloader? – KIIV Apr 29 '20 at 21:39
  • Unfortunately not. I am using a FTDI 232 USB to serial adapter. I will buy an st-link soon though. – Game Instance Apr 29 '20 at 22:36
  • Note that a ST-LINK v2 can be very cheap on most chinese webshops, don't buy a segger jlink if you just want to try doing some embedded programming. Tthe discovery or nucleo boards are also cheap and capable of programming other MCUs – Tarick Welling Apr 30 '20 at 13:16
  • @TarickWelling Thanks for the tip. I'll opt for the ST-Link V2 as it also seems few times cheaper that the Segger J-link. However, how would any of these tools help figure out the cause of these messages? – Game Instance Apr 30 '20 at 18:27
  • @GameInstance - you can use SWD or JTAG adapters (like ST-Link, j-Link and many others) to debug what the controller is actually doing before/when it send the string to its UART. Furthermore, you can program the controller without needing a bootloader that interprets the UART stream to write it into its flash. – HelpingHand May 01 '20 at 07:53
  • Tarick Welling is right that the cheapest way to get an SWD adapter for STM32 are (a) the chinese remakes of standalone adapters, and (b) the integrated ST-Link subcomponents included in the STM-Nucleo/Discovery boards. Note that the latter only support SWD (not JTAG) for wiring reasons, and that ST is a special (low-cost) kind of debug adapter whereas j-Link is among the most affordable ones in the league of "true JTAG adapters". – HelpingHand May 01 '20 at 07:56

0 Answers0