cancel
Showing results for 
Search instead for 
Did you mean: 

Flash STM32F103 via SPI

Posted on October 09, 2015 at 16:22

Hi,

i have an application with an STM32F103 and a Raspberry Pi, connected via full duplex SPI.

I want to implement automated flashing of the STM. The idea is:

RPi contacts STM32 via SPI and if STM32 does not answer or has an old version of my software,

I want to flash the STM over SPI with the RPi.

I could connect the BOOT Pins and Reset to the RPi and get the STM into a bootloader.

Can I flash the STM32 with the default bootloader via SPI?

Background: Users should be able to use a factory new STM without knowledge about the hardware or even electronics.

#stm32-spi-bootloader-flash
1 REPLY 1
qwer.asdf
Senior
Posted on October 09, 2015 at 16:30

According to

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00167594.pdf

and 

http://www.st.com/web/en/resource/technical/document/application_note/DM00081379.pdf

STM32F1's bootloader doesn't support SPI. You should either switch to a newer MCU, like STM32F4xx or STM32L0xx, or use USART instead of SPI:

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00264342.pdf

.