2025-03-29 1:37 PM
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?
2025-03-29 1:43 PM
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.
2025-03-29 2:39 PM
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?
2025-03-29 2:42 PM
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?
2025-03-29 3:05 PM
See AN2606 for a list of supported peripherals and pins
Yes, you can use the USB DFU bootloader, provided it's wired to the supported pins.
2025-03-30 12:03 AM - edited 2025-03-30 1:42 PM
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.
2025-03-30 7:51 AM - edited 2025-03-30 7:52 AM
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
2025-03-30 12:19 PM
No, this a bootlader over SPI interface.
2025-03-30 1:17 PM
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.
2025-03-30 1:29 PM - edited 2025-03-30 1:54 PM
I invite you to refer to the application note AN4286 "SPI protocol used in the STM32 bootloader"
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.