cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f746 sdmmc 1 Bit vs 4 Bit Data

FJB2069
Senior

Designing custom board based on STM32F746G-DISCO.  I am using the TQFP chip, so a few less IO.   The DISCO board uses a 4 wide data, but I do not have enough pins so I will only have 1 bit wide data.  I only want to use SD card to be able to upload new firmware via bootloader.

 

Can the bootloader work with 1 bit data?

9 REPLIES 9
TDK
Guru

The system bootloader doesn't support SD.

If you make a user bootloader, it's up to you to decide what to support. Only 1 bit for data can certainly work.

If you feel a post has answered your question, please click "Accept as Solution".
FJB2069
Senior

I didn't realize that, thanks!

 

What peripherals does the system bootloader use?    

 

I am leaving the USB_OTG_FS,  I assume I could boot load with that?

FJB2069
Senior

With the micro SD,  my custom board will only be able to utilize 1 bit data (not enough IO for 4 bit).  Will that cause an issue with utilizing the SD micro as a bootloader for firmware updates?

See AN2606 for a list of supported peripherals and pins

https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

 

Yes, you can use the USB DFU bootloader, provided it's wired to the supported pins.

 

If you feel a post has answered your question, please click "Accept as Solution".

Discussion from this thread moved here.

Hello,

As we understood from your post here you thought that the native bootloader supports the firmware update over the SDcard which is not the case. The proposed solution above with the SDcard is to build your own bootloader. 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Then what is described in An2606 Table 92 regarding bootloader and SPI1 and SPI2?  Isn't this applicable to the SD micro interface?

 

STM32 microcontroller system memory boot mode - Application note

No, this a bootlader over SPI interface.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Sorry, I'm confused:  doesn't the sd micro use SPI as interface?

 

STM32 microcontrollers can interface with microSD cards using two main methods:

1. SPI (Serial Peripheral Interface) Mode: This is a widely used and simpler method for interfacing microSD cards. It requires fewer pins and is supported by most STM32 microcontrollers. In SPI mode, the microSD card communicates using the SPI protocol, which involves pins like MOSI (Master Out Slave In), MISO (Master In Slave Out), SCK (Serial Clock), and CS (Chip Select).

2. SDIO (Secure Digital Input Output) Interface: Some STM32 microcontrollers, especially higher-end models, support the SDIO interface. This is a dedicated hardware interface for SD cards, offering higher data transfer rates compared to SPI. It uses multiple data lines for faster communication and is ideal for applications requiring high-speed data access.

I invite you to refer to the application note AN4286 "SPI protocol used in the STM32 bootloader"

mALLEm_0-1743366500753.png

Do you think this is what an SDcard over SPI is expecting?

With SPI bootloaader STM32 behaves as a slave to a SPI Host while with a custom bootlader STM32 is a host and the SDcard is a slave over SPI. Moreover, the bootlader protocol over SPI is not compatible with the SDcard protocol communication over SPI.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.