cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f303 bootloader problem

mli
Associate II
Posted on November 13, 2013 at 23:43

I can successfully load the code from stm32f407 processor to stm32f100 in my project by using f100's bootloader firmware and RS232 protocol.

However, I used the same(similar) way to load the code to stm32f303 processor, I never get the acknowledgement back from f303 on RS232 bus.  I read the application note (AN2606)numerous times but still could not figure out what is the unique thing I have to pay attention on this processor. Does anyone have good knowledge about this issue? Thanks in advance.

 

#too-vauge #answer-for-clive's-questions
10 REPLIES 10
Posted on November 14, 2013 at 01:03

Assume forum members know next to nothing about your board, or what you've actually done/tested.

Some useful things to communicate:

What board are you using?

What USART and pins are you using? What are other pins doing?

What baud rate and settings are you using?

What exactly is failing? The sending of 0x7F and response of 0x79?

What commands have you tried sending the system loader?

How are you wiring BOOTx pins? And NRESET?

Does the board function when programmed via SWD?

Does the USART function with other test code?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mli
Associate II
Posted on November 14, 2013 at 01:28

mli
Associate II
Posted on November 14, 2013 at 01:39

Clive,

Here is my answer.

What board are you using?

we designed our board by ourselves. F407 is the major processor with f303 and f100 as subprocessors having different tasks.

What USART and pins are you using? What are other pins doing?

On F407, we use usart6 to talk to f100 and I can successfully load code using usart6 and the bootloader of F100. I am using usart3 to talk to F303VCT6 and want to do the same thing as I did for F100. However, I got nothing from F303 after I send ''0x7f'' to it.

What baud rate and settings are you using?

I can use baud rate from 9600 to 115200 for F100 and I tried the same. Nothing works.

What exactly is failing? The sending of 0x7F and response of 0x79?

basically, no acknowledgement from F303 after I sent 0x79.

What commands have you tried sending the system loader?

I even can not start yet.

How are you wiring BOOTx pins? And NRESET?

By default for F303, nBoot1 is high in the option byte which means Boot1 pin is low.

I set Boot0 high before I toggle Nreset pin. And the F303 seems in boot mood.

Does the board function when programmed via SWD?

yes.

Does the USART function with other test code?

yes. our applications can talk to each other between F407 and F303.

Again, thank you. You helped me out with F100 bootloader issue two weeks ago.
Posted on November 14, 2013 at 04:54

Ok, but which USART and pins are you using on the F3 part? Is it possible you are transitioning other pins on the F3?

Remember that 8E1 equates to 9-bit using Even Parity, and 1 stop bit on STM32 parts.

Have you captured the 0x7F/0x79 interaction on a scope/analyzer? Confirming the TX/RX are functioning. Absent the F3, can you loop the TX and RX and confirm functionality there. How about externalizing the F3 connectivity, and using the Flash Demonstrator?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 14, 2013 at 04:58

Make sure not to drive NRESET with a PP driver, use OD with a pull-up

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mli
Associate II
Posted on November 14, 2013 at 19:56

clieve1,

This morning, I tried several ways.

1. I used F303 discovery evaluation board. I tied PD6, PA11, PA12 to the ground, boot0 to 3.3v via a resistor. I disconnected the SB19. I connected the serial pins(pa8 and pa9) on the discovery board to our virtual usb/serial cable.

I downloaded the flash demonstrator from st.com.

I recycled the power and observed that the discovery board is in boot load mode.

I run the flash demonstrator program and it told me that ''device is not recognized'' message.

Closed the flash demonstrator, and I run hyper terminal. I typed in character and monitored the signal, for the receive line of the discovery board, on oscilloscope and find the pulses when I typed on the hyper terminal.  But on the transmit line, nothing is found, which is line with what I did on our design board. I have no idea what I should do next. The bootloader works very well for the F100 processor. What is strange issue!

Please help me!

Posted on November 14, 2013 at 20:05

I connected the serial pins(pa8 and pa9) on the discovery board to our virtual usb/serial cable.

USART1 Needs PA9 and PA10

USART2 would be PD5 and PD6
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mli
Associate II
Posted on November 14, 2013 at 20:13

sorry. I used pa9 and pa10 actually.

Posted on November 14, 2013 at 20:30

Avoid HyperTerminal, try something like RealTerm where you can actually send Hex bytes.

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