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 03, 2017 at 17:50

>>

Is this an inherent problem of the controller or are we doing something wrong?

Most likely the latter. Not familiar with your design.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Imen.D
ST Employee
Posted on May 04, 2017 at 17:36

Hi

Nayani.Parmin

,

Please precise the device part numberyou are using.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on May 05, 2017 at 04:46

Hi CliveOne,

The design is pretty simple. USART1 Rx, Tx pins are level shifted (RS232) and brought out on to a connector along with GND. These pins are used only for UART and nothing else. We have jumpers on BOOT pins. USB is not being used.  Controller is going in to boot mode but is not responding to boot loader. Remaining pins are used as I/Os, SPI etc. Hope this clarifies. Thanks.

Posted on May 05, 2017 at 05:19

Hi Imen D,

The exact part number is STM32L151RBT6A. Hope this helps. Thank you.

Max
ST Employee
Posted on May 08, 2017 at 08:59

Hello,

Look at 

http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf

 and make sure for the details regarding your device.

Make sure there is no activity on the other bootloader pins because the bootloader may select another communication interface.

Posted on May 08, 2017 at 09:29

The design is pretty simple. USART1 Rx, Tx pins are level shifted (RS232) and brought out on to a connector along with GND

Have you checked the signals at RX during boot ?

Level shifters might be inverting, or not.

Posted on May 08, 2017 at 10:13

Hi AvaTar,

Yes I have checked the level shifter and it works fine. As mentioned in my first post, once code is flashed into the controller using ST Link, the serial port works fine (both receive and transmit). The issue is when the controller is in boot mode. It just does not respond. Thank you.

Regards

Posted on May 08, 2017 at 10:17

Hi Max,

Thanks for the advice. It is precisely for this reason that I mentioned that USB is not being used (USB for flashing). I have also put a pull-up resistor on USART2 Rx pin so no untoward signals appear on the pin and push controller into looking at that pin for boot commands. However I will go through the reference you mentioned and revert.

Best wishes.

Posted on May 08, 2017 at 15:58

Well you're going to need to go back to first principles, bring the chip up in the System Loader and talking to it via something like RealTerm at 9600 8E1, use hex mode and send the 0x7F symbol, see if the device responds with the 0x79, and if it does walk through a couple of the documented commands the loader should recognize. Start with the identification and versioning commands.

If it doesn't work at this level the application isn't going to work either. Use a logic analyzer to record the device reset and USART1_TX/RX pin transactions through the dispatch of the 0x7F and the response.

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