Skip to main content
Parmin Nayani
Associate III
May 3, 2017
Question

stm32l151 bootloader issue

  • May 3, 2017
  • 5 replies
  • 4451 views
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.
    This topic has been closed for replies.

    5 replies

    Tesla DeLorean
    Guru
    May 3, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Parmin Nayani
    Associate III
    May 5, 2017
    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.

    AvaTar
    Senior III
    May 8, 2017
    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.

    Technical Moderator
    May 4, 2017
    Posted on May 04, 2017 at 17:36

    Hi

    Nayani.Parmin

    ,

    Please precise the device part numberyou are using.

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Parmin Nayani
    Associate III
    May 5, 2017
    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
    May 8, 2017
    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.

    Parmin Nayani
    Associate III
    May 8, 2017
    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.

    Tesla DeLorean
    Guru
    May 8, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Max
    ST Employee
    May 24, 2017
    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
    Parmin Nayani
    Associate III
    May 25, 2017
    Posted on May 25, 2017 at 11:26

    Hi Max and Clive One,

    Here is the ID

    0690X00000603r2QAA.jpg got from ST_Link.

    Gidi
    ST Employee
    May 25, 2017
    Posted on May 25, 2017 at 09:40

    Have a look at this:

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

    Parmin Nayani
    Associate III
    May 25, 2017
    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.

    Technical Moderator
    May 25, 2017
    Posted on May 25, 2017 at 17:22

    Hi

    Nayani.Parmin

    ,

    Could you pleasecheck with STLINK-Utility @address 0x00000000 if boot is configured to system memory where bootloader resides or not ?

    Thanks

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks