cancel
Showing results for 
Search instead for 
Did you mean: 

USART System Bootloader - STM32L151xx

uilter
Senior
Posted on June 08, 2015 at 22:05

Hello,

I'm trying to use the default bootloader of this STM32L151CCT6 over USART1.

I've read and follow all the tips and tutorials of AN2606 and AN3155, but without sucess.

This is my process to try a communication:

  • Turn on my board

  • Set the microcontroller in reset mode (LOW in Reset Pin)

  • Set the pin BOOT0 in HIGH

  • Release the Reset Pin

  • Send 0x7F;

  • Wait for 0x79;

When I send 0x7F and wait for 0x79, it never returns.

Am I missing something in this process?

Many thanks for any help or guidance that can be offered!
10 REPLIES 10
Posted on June 08, 2015 at 22:30

Analogue supplies connected?

Even Parity?

CMOS Serial? Not RS232 levels.

Sent as hex, in a tool like RealTerm?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
uilter
Senior
Posted on June 08, 2015 at 23:08

Hello Clive1,

My board is connected to MAX3232 then I have a DB9 to my computer. The pins RX/TX has a pullup resistor +3V3. (This little module - 

http://i00.i.aliimg.com/photo/v0/1857319466/F08056_JMT_1_Pcs_MCU_Mini_RS232.jpg

)

I used the Terminal or Realterm to send the 0x7F. In these software I used 9600, 19200 or 115200 8N1, but nothing changed.

Thank you!

Posted on June 08, 2015 at 23:41

Right now you need to confirm the part is functional in any fashion

EVEN PARITY

Double check the TX and RX sense is correct.

Check you can access the part via JTAG or SWD

Check the state of the NRESET pin

Check the orientation of the part

Do you have a schematic

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Hamid.Wasti
Associate III
Posted on June 09, 2015 at 09:09

After releasing reset, you need to wait for a while for the part to come out of reset and start executing the bootloader before sending out the 0x7F.

You need to make sure that BOOT1 pin is low.

I am not familiar with the terminal program you are using, but are you sure you are sending out 0x7F and it is not getting translated to some other character due to terminal emulation?

uilter
Senior
Posted on June 09, 2015 at 14:02

Hello Clive1,

With Even Parity don't works either.

The sense of Tx/Rx is correct, because I use this pins to send AT Commands in my application.

The JTAG and SWD is ok too.

I have a scope here to debug this process, and I can see NRESET pin changing.

uilter
Senior
Posted on June 09, 2015 at 14:09

Hello hwasti,

When I start the process, I hope for a while until send 0x7F.

In this part number there isn't this pin (BOOT1).

Is for sure that this terminas are sending the correct values, however, do you have another to tell me?

Hamid.Wasti
Associate III
Posted on June 10, 2015 at 11:19

>In this part number there isn't this pin (BOOT1).

Sure there is. It is pin 20 on the 48 pin packages. After boot it can also be used as PB2 and a few other alternate functions.  But during boot it needs to be externally driven or pulled low in order for you to boot to the ROM bootloader.

uilter
Senior
Posted on June 10, 2015 at 14:02

Hello hwasti and clive1!

I was discussion with a friend about this issue, and he pointed the problem.

The board I'm using, does not provide the pins PA9 and PA10 and I'm using the PB6 and PB7 to send my AT commands in the application. However, I didn't pay attention for this detail that is written on AN2606.

I will design a new board for my project and change this pins.

I'd like to thanks your help!

Hamid.Wasti
Associate III
Posted on June 10, 2015 at 23:05

Glad you found the problem. As you redesign the board, keep in mind the chip does have a BOOT1 input and it needs to be low during boot in order to do what you want to do.