Skip to main content
Visitor II
March 25, 2022
Question

How to program a nucle boat (L053R8) using UART?

  • March 25, 2022
  • 3 replies
  • 3147 views

hey,

I went through all possible data sheets I could find did all the required things but my Nucleo still won’t be programmed with uart.

I have put boot0 on VDD pin next to it. For confirmation I also put PB2 (nboot1) on ground next to it.

I tried powering the nucleo through both the USB as well as an external supply (E5V) and switched to e5v.

I reset the controller to try programming.

I connected my Rx, Tx and Ground of my UART to usb (which I checked with the nucleo by programming a UART program through st link and it works)

I am using St flash which says there was no communication

and stm32 programmer says it timed out for the com port

i even checked that there was no read or write protection enabled and nboot1 option bits are correct by connecting to stm32 programmer through STlink

what am I missing?

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    March 25, 2022

    Welcome, @AVals.1​, to the community!

    via which USART of the STM32L053R8 did you try to establish the connection?

    > I connected my Rx, Tx and Ground of my UART to usb

    This description is not clear: Which UART is connected to where or which USB?

    Regards

    /Peter

    AVals.1Author
    Visitor II
    March 25, 2022

    I'm using an FTDI, connected the Rx, Tx to the USART1 (PA9, PA10) and Gnd from FTDI to the Gnd of Nucleo

    Technical Moderator
    March 25, 2022

    OK, I also had almost exactly this combination (well, using a CH340 bridge) a few months ago and was able to access the NUCLEO-L053R8 via STM32CubeProg after a reset without any problems. However, I don't currently know when I will find the time to pick out the NUCLEO again to test it again.

    Regards

    /Peter

    AVals.1Author
    Visitor II
    March 25, 2022

    Thanks so much for the reply!

    Could you let me know YOUR procedure for flashing the STM32L053 nucleo? What tools you used (ST Flash demo or STM32Cube Programmer) ? Did you have to change the internal bootloader, or any settings via ST-Link? What other pin connections did you require? and how did you power up the Nucleo?

    AVals.1Author
    Visitor II
    March 25, 2022

    Thanks so much for the reply!

    Could you let me know YOUR procedure for flashing the STM32L053 nucleo? What tools you used (ST Flash demo or STM32Cube Programmer) ? Did you have to change the internal bootloader, or any settings via ST-Link? What other pin connections did you require? and how did you power up the Nucleo?

    Technical Moderator
    March 25, 2022

    As already mentioned, I used the STM32CubeProg.

    The internal bootloader cannot be changed or altered because it is hard programmed.

    With the STM32CubeProg, I changed the connection option (light blue button to the left of Connect) from ST-Link to UART, 115200, even parity. Perhaps the parity is already set incorrectly because Parity None is very often used. See AN2606 for a detailed description of the bootlader.

    I have supplied the NUCLEO via USB.

    Regards

    /Peter

    AVals.1Author
    Visitor II
    March 25, 2022

    Thanks! I have the same connections and the exact same settings for the STM32Cube programmer as well

    But I get this error

    "Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again..."

    My uart connections are correct

    I have put a jumper between boot0 and vdd (CN7 - 5, 7)

    I reset and try again and get the same error

    How are you powering the Nucleo?