cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L471 Bootloader and SPI

ChrisFujii
Associate II

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 ACCEPTED SOLUTION

Accepted Solutions

Hello @ChrisFujii 

In the same application note AN2606, specifically in section (71) covering STM32L47xxx/48xxx devices, you will find 2 tables of 2 bootloader versions (V10.x and V9.x), these tables list all the available interfaces with the exact corresponding pins.

With regards

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

View solution in original post

4 REPLIES 4
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"
ChrisFujii
Associate II

Hi Sirine, 

Thank you very much for your reply, and sorry for my late response since it was the weekend.

I understand that SPI in bootloader mode is not supported but it's still driven by DMA, it keeps MISO line HIGH level in that mode, and there is no way to disable SPI interface. I had not read that application note you mentioned.

Then I would like to know the states of other pins on STM in bootloader mode, so that I could consider other ways. Could you provide me that info, or show me the reference?

Thanks and best regards,

Chris

Hello @ChrisFujii 

In the same application note AN2606, specifically in section (71) covering STM32L47xxx/48xxx devices, you will find 2 tables of 2 bootloader versions (V10.x and V9.x), these tables list all the available interfaces with the exact corresponding pins.

With regards

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

Hi @SirineST,

Thank you very much again for your reply.

I'm reading AN2606 and the tables, and understand interfaces which the bootloader initializes. It leads an answer that I can't use wired-OR of 3 parts, STM, NRF and NOR Flash.

Thank you,

Chris