cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l151 bootloader issue

Parmin Nayani
Associate III
Posted on May 03, 2017 at 15:39

Hi,

We have a custom designed STM32L151R board. We have not been able to flash the code using the flash loader application (demonstrator gui) . We are able to load the code using ST-Link and the serial port works properly when configured through the code. Is this an inherent problem of the controller or are we doing something wrong? We need to get the serial boot loader working as there may be site updates. Thank you for your time. Awaiting your suggestions to solve the problem.

Note: this post was migrated and contained many threaded conversations, some content may be missing.
23 REPLIES 23
Posted on May 08, 2017 at 17:49

Hi Clive One,

I have checked signal levels on USART2 Rx pin. It is high (due to pull-up resistor). I have also seen the document mentioned by Max. Everything looks good still the controller is not responding in boot mode. I have not checked 7f command at such low baud rate.  I will test and update. Again when programmed using ST Link, application code works like charm (serial port sends and receives bytes properly).

Posted on May 08, 2017 at 18:32

Are you sure it supports USART2. Try USART1 on PA9/PA10.

Appreciate that ST-LINK and USART2 function in normal operation, but System Loader has specific pins and bit time measurements. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 08, 2017 at 19:27

Current loader version looks to support USART1 PA9/PA10 and USART2 PD5/PD6

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 12, 2017 at 05:51

Hi Clive One,

I am using a 64 pin device and pins for USART2 are PA2 and PA3. I don't have PORT D on this device. I have a pull-up resistor on USART2 Rx pin. Tried testing the device at 9600 with 8E1 by sending 0x7f (hex) The reply is, once 00 and next time 7f. Tried even 57600 but no change. Any other suggestions please? Thank you.

Regards

Posted on May 12, 2017 at 06:37

Clive's comment is right: There is a document telling which peripheral and which GPIO are covered by the chosen STM32 flashloader. It's a document to check before doing PCB schematics. IAP (In Application Programming) seems to be the way if the board is fixed

Posted on May 15, 2017 at 04:27

As Clive said you must use USART1 PA9/PA10 orUSART2 PD5/PD6.

Any other pin will fail including

PA2 and PA3.

This is probably the reason of your troubles...

Max
ST Employee
Posted on May 24, 2017 at 05:12

you can also use the STLink utility.

After connecting you see the device ID and dice revision on the main screen.

0690X00000603qeQAA.jpg
Gidi
ST Employee
Posted on May 25, 2017 at 09:40

Have a look at this:

https://community.st.com/videos/1417-stm32-uartbootloader-howto

Posted on May 25, 2017 at 11:26

Hi Max and Clive One,

Here is the ID

0690X00000603r2QAA.jpg got from ST_Link.

Posted on May 25, 2017 at 11:32

Hi Gidi M,

We had been using STM series controllers for some time. We never faced any problem with STM32F103 controllers. We programmed these controllers using the 'Demonstrator GUI '. We were never able to load code into this controller using the USART boot. We have problems with STM32F407 controllers also, but they work some times and don't other times. I will watch the video fully and see if I am making any mistakes. Thank you.