cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L471 Bootloader and SPI

ChrisFujii
Visitor

Hello, 

I'm using STM32L471 and Micron MT25QL NOR Flash with single SPI interface. MT25 is also connected with other MCU (NRF52) using the same lines. I'm trying to write STM firmware in BOOT0 serial bootloader controlled by NRF using STM's USART3. The firmware is stored in MT25, NRF reads it using SPI, and transfers it to STM using UART.

The problem is that when STM booted in bootloader mode, it seems that STM initializes SPI interface with Push-Pull configuration on MISO line. This behavior causes a collision between MISO signal of STM and MT25, the signal level goes intermediate level about 2.0V, and the result is NRF reads FFh.

So my questions are:

  1. Is there a way to disable STM SPI in bootloader mode?
  2. To solve this, I'm considering that NRF keeps STM in reset state while NRF is reading 4KB (e.g.,) from MT25 , then let STM boot with BOOT0=H and write firmware data on its internal flash, repeat it until all firmware is written. Is there any possibility of problems when resetting and BOOT0 boot again and again?

Best regards,

Chris

1 REPLY 1
SirineST
ST Employee

Hello @ChrisFujii 

Welcome to the community. It seems that this issue has already been addressed in this application note:  Introduction to system memory boot mode on STM32 MCUs at the section 68 STM32L412xx/422xx devices.

SirineST_0-1755248154284.png

Also, the STM32L471xx errata sheet states that SPI interface is not supported in bootloader mode for this device:

SirineST_1-1755248284891.png

Therefore, I suggest that you use another interface for this device.

With regards

 

If your question is answered, please close this topic by clicking "Accept as Solution"