1-bit SDIO SD Card Interfacing problem in f_open() function for STM32F4 Discovery Board
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-25 10:21 AM
Posted on July 25, 2016 at 19:21
Hello,
I am using CubeMx to generate 1-bit SDIO SD card code. I have done so much programming using CubeMx and all those codes workfine. But When I generate SD code it is giving error (Hard Fault) at the function f_open(). Here is the code sequence which I used.res = BSP_SD_Init();
if
(res!=FR_OK)
{
Error_Handler();
}
res = f_mount(&SDFatFs,
''''
,1);
if
(res!=FR_OK)
{
Error_Handler();
}
res = f_open(&myFile,
''test.txt''
,FA_READ);
it goes into the hard fault at f_open(). Anyone have done SD card with STM32F4??
#stm32f4 #f_open() #sd-card
Labels:
- Labels:
-
SDIO-SDMMC
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-25 11:20 AM
Posted on July 25, 2016 at 20:20
Make sure you have an adequate stack allocation.
Have a proper Hard Fault Handler so you can see exactly what it is faulting on. If your understand what is faulting you can focus on how to fix it.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-25 1:42 PM
Posted on July 25, 2016 at 22:42
If you use DMA, file handlers can be local.... if stack is located in CCRAM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-07-26 12:56 AM
Posted on July 26, 2016 at 09:56Thanks clive1.
