Understanding uSD and MCU changing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-17 10:37 AM
Hi, I was trying to have microSD logging with F439 Nucleo. I can't see example with mentioned board. Please let me know:
1. example for mentioned board to log data in microSD
2. I tried configuring SD-4 bit, but couldn't identify the pins intialized in generated code (in MX pins used were visible)
3. Tried importing F413 Nucleo e.g., but couldn't identify pins configured and wasn't able to change MCU to F439.
Please guide.
Solved! Go to Solution.
- Labels:
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-05 2:48 AM
Closing post...not getting any replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-17 11:01 AM
NUCLEO-F439ZI
https://www.st.com/en/evaluation-tools/nucleo-f439zi.html
https://www.st.com/resource/en/datasheet/stm32f439zi.pdf
Options for SDIO/SDMMC pins going to be very limited
PD2 CMD
PC8 D0
PC9 D1
PC10 D2
PC11 D3
PC12 CLK
GPIO for Socket Card Detect
Usually found at upper end of connectors
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-20 12:23 AM
I mean pin configurations in code, I can see pin assignment in MX and board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-20 1:42 AM - edited ‎2024-05-20 1:47 AM
Callbacks in the MSP code?
For examples look in Applications directory of STM32f4x9 EVAL boards and similar. Going to use materially same pins as few choices.
Check adapter board has pull-ups on data and cmd lines. See schematic for EVAL boards.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-20 5:25 AM
Thanks (Im new to ST environment and also using new interfaces),
I was able to identify pins in "stm32f4xx_hal_msp.c", will work on:
Understanding uSD SDIO interface configurations in code and
Having R/W e.g. for Nucleo F439.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-20 10:10 AM
Hello,
You can use CubeMx code generator tool for any board you want by following this video on Youtube especially at the minute 06:00.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 1:23 AM - edited ‎2024-05-22 1:24 AM
Please check reply to topic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 1:24 AM - edited ‎2024-05-22 1:28 AM
Hello, I made e.g. with default init on MX for F439 Nucleo, SDIO-4 bit with FATFS as SD card.
Then added init of FATFS_LinkDriver() code with writing to file from FatFs_uSD e.g. of F469 Discovery.
I don't see any pins changing (especially clk). Code flow goes through
FATFS_LinkDriver() > f_mount() > f_mkfs() > if (stat & STA_NOINIT) return FR_NOT_READY;
Please check what am I missing. I have connected microSD through a holder kit, can add pull ups on data and cmd, but should see some pins changing right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 1:31 AM - edited ‎2024-05-22 1:36 AM
Please check what am I missing.
Sorry but how could community members check what you are missing if you didn't share your project and your schematics?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-22 4:11 AM - edited ‎2024-05-23 2:02 AM
Hi, Thanks for your response, I have attached project. Im now failing at:
if( hsd->SdCard.CardVersion == CARD_V2_X)
{
/* SEND CMD55 APP_CMD with RCA as 0 */
errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);
if(errorstate != HAL_SD_ERROR_NONE)
{
return HAL_SD_ERROR_UNSUPPORTED_FEATURE; /* error here in SD_PowerON() in "stm32f4xx_hal_sd.c" */
}
}
Also the clock looks 400 kHz, In code settings look to be for 48 MHz. Im directly connecting Nucleo board lines to SD card holder board.
On SD board | Controller pins | Nucleo board | |
3v3 | 3.3 | CN8.7 | CN8.7 |
gnd | GND | CN8.11 | CN8.11 |
d0 | D0 | PC8 | CN8.2 |
d1 | D1 | PC9 | CN8.4 |
d2 | D2 | PC10 | CN8.6 |
d3 | D3 | PC11 | CN8.8 |
d5 | CLK | PC12 | CN8.10 |
d7 | CMD | PD2 | CN8.12 |
