cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the Bootloader and STM32 Cube Programer in STM32L471

Javier Gutierrez
Associate II

Hello,

I have used the STM32CubeProgrammer for update the firmware with the bootloader of the ST from USART1. It's works fine but now I have a problem. The MCU is the STM32L471.

In my BoardI have several devices connect to peripherals of the MCU, SPI1, I2C1, USART2,USART3, UART5. The problem is with the USART2:

  • The device connect to the USART2 is a Xbee module placed in a socket. The MCU controls the Power of this device with a digital output and a mosfet. This output is low active 0 = the Xbee is powered; 1: the Xbee is Off.

  • When I remove de Xbee module of my board, the bootloader works fine, but when I placed the module in the socket the bootloader secuence does't work and I cant't connect with the MCU in the STM32CubeProgrammer, appear the msg : " Error: Activating device: KO. Please, verify the boot mode configuration and check the seria..."

  • I have tried with start the boot bode with the pin boot 0 and with a Jump Software to the address of Bootloader and both methods works fine without Xbee Module but it work's badly if the Xbee is placed.
  • I have analyzed the problem and i hace seen taht when I do the reset to start the bootloader the GPIO that controls the power of Xbee is 1 for a few ms (Powered Off Xbee) and after is 0 (Powered On Xbee) . When the Xbee is Powered it sends a plot of six characters to the MCU 0x7E,0x0,0x2,0x8a,0x0,0x75,0x0.

Regarding all this, I have a few questions:

  • Is possible that this characters does that the bootloader wait to receives more characters in the Usart2 and doesn't attend the Usart1 and it's the cause that I can't connect through the STM32Cubeprogrammer to the MCU?
  • Is strange that the bootloader doesn't work why the character 0x7F doesn't apperar in ther USART2 but looks the bootloader blocks.
  • Is possible configure the bootloader for disable source peripherals like USART2, SPI1, etc...?
  • Is possible change the configuration of the GPIO at the bootloader secuence?

I searched in ST documentation but I haven`t found any register for configure the bootloader.

Best Regards

2 REPLIES 2
Tilen MAJERLE
ST Employee

Hello Javier,

Please refer to application note AN2606.

If Zigbee sends some data or pull USART line low (non-idle state), then bootloader will start listening on USART2 and will disable USART1.

You have to guarantee that interfaces you don't wish to use for bootloader are in stable and "idle" positions.

The loader is going to be intolerant of signals on other interfaces it is monitoring. The documentation should call out these pins. It is not receiving the 0x7F as much as it is timing the pattern.

Write your own loader in one of the first flash blocks and have it function however you want it to. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..