2014-07-03 08:56 AM
I am attempting to communicate to the bootloader through RS232 on USART 2 on the STM32L152VB. I have Boot 0 pulled up and I believe I am in the bootloader because the application code is clearly not running. I am using the IAR Kick Start board which has USART 1 pins dedicated to the LCD display and USART 2 brought out as RS232. I have tried the Flash Load Demonstrator as well as Realterm to send the initial auto baud 0x7f byte to the bootloader. I get no response. I was able to make this work on a different eval board for the F1 processor using USART 1. The manual says that USART 1 or 2 can be used for the L152. Does the bootloader always listen on both 1 and 2 or do I have to do something special to direct it to USART 2? Thanks.
2014-07-03 11:11 AM
USART2 has to use PD5/6, Make sure to use EVEN parity, ie 9600 8E1
Have you any other indication that the chip is functioning? Can you access via JTAG/SWD interface? Need to connect digital/analogue supplies.2014-07-03 11:44 AM
Thanks for the quick response. Yes the board is fully functional. I can write, load and test code through the jtag no problem. The board has indicator lights to verify that power is on so I know I have power while I am working on the bootloader. I have tried several baud rates/settings (including 9600, 8E1). Also, with these exact port settings using Realterm I can communicate to an F1 device (which uses USART 1) on another eval board. On the L1 board I am using USART 2. The board has the CTS/RTS lines connected to the L1. In RealTerm I selected None for Hardware Flow control but also experimented with other settings. Realterm also lets me set CTS and RTS low or high which I tried changing those with no success. Do the USART 1 pins need to be forced to a particular state so the bootloader knows to talk to USART 2? Thanks for your help.
2014-07-03 11:49 AM
Also, yes the USART 2/RS232 port is connected to PD5/6.
2014-07-03 04:44 PM
You will need to ensure the USART1 RX doesn't transition.
2014-07-07 07:50 AM
Thanks for your help. The problem was with the eval board. It needed to have the RS232 port enabled to allow communication to the L1 USART 2.