Skip to main content
Visitor II
March 29, 2025
Solved

stm32f746 sdmmc 1 Bit vs 4 Bit Data

  • March 29, 2025
  • 3 replies
  • 1118 views

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?

    This topic has been closed for replies.
    Best answer by mƎALLEm

    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.

     

    3 replies

    Super User
    March 29, 2025

    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.

    FJB2069Author
    Visitor II
    March 29, 2025

    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?

    Super User
    March 29, 2025

    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.

     

    FJB2069Author
    Visitor II
    March 29, 2025

    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?

    Technical Moderator
    March 30, 2025

    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. 

    FJB2069Author
    Visitor II
    March 30, 2025

    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