Skip to main content
Associate III
May 1, 2024
Solved

SDIO DETECT is changed to PD5 which was earlier PF3

  • May 1, 2024
  • 1 reply
  • 1512 views

Hi, All

    my file system is working with the eval board of STM32U575I-EV.   

    However, run the same software with NUCLEO-U575ZI-Q, file system doesn't work.

    I found that SDIO DETECT is changed to PD5 NUCLEO-U575ZI-Q which was  PF3 on STM32U575I-EV.

    How can I change the SD card pin definiton in IOC? Thanks in advance.

 

Best Regards

Victor

    Best answer by MNapi

    I have no clue what you are doing, did you generate the new code in CubeMX ?

     

    did you check main.h file

     

    #define SDCARD_DETECT_Pin GPIO_PIN_0

    #define SDCARD_DETECT_GPIO_Port GPIOI

    1 reply

    MNapi
    Senior II
    May 1, 2024

    look for

    fatfs_platform.h

     

    /* USER CODE END Header */
    /* Includes ------------------------------------------------------------------*/
    #include "stm32h7xx_hal.h"
    /* Defines ------------------------------------------------------------------*/
    #define SD_PRESENT ((uint8_t)0x01) /* also in bsp_driver_sd.h */
    #define SD_NOT_PRESENT ((uint8_t)0x00) /* also in bsp_driver_sd.h */
    #define SD_DETECT_PIN GPIO_PIN_5
    #define SD_DETECT_GPIO_PORT GPIOD
    /* Prototypes ---------------------------------------------------------------*/
    uint8_t BSP_PlatformIsDetected(void);

    Associate III
    May 3, 2024

    Hi, NNapi

       Thank you for quick response. I appreciate it very much.

       However, my source code don't has fatfs_patform.h. I also search the source code and cannot find the definiton of SD_DETECT_PIN in my package. please advice.

    Victorheca01_0-1714771710993.png

    Thanks in advance.

    Victor

    MNapi
    Senior II
    May 4, 2024

    do search for PF3 , it is defined somewhere and change to PD5