Microcontroller STM32L452RET6 using to interface SD card with SDIO(4bit bus) fatfs, freertos and dma by STMCube generated code. But generated code is not working and even Card Mount is not possible. What is the reason?? Please answer ASAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-15 3:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-15 3:49 AM
Hello @KPras.2​
First let me thank you for posting.
To be able to push further the analysis could you please provide your file .ioc which show the problem.
I'll be waiting for your feedback.
Thx
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-15 4:33 AM
I am using STMCubeMx ver 6.6.1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-15 4:54 AM
Hello @KPras.2​
I tried to reproduce the behavior you encountered but it works fine from my side.
I activated the SD card with SDIO(4bit bus) fatfs, freertos and dma then i generated the code
using STM32CubeIDE.
I put below my file ioc please have a look .
If you supply the ioc-file, we can try to re-produce the issue with your exact configuration.
I'll be waiting for your feedback.
Thx
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-23 10:47 PM
void sd_card_mount_card_capacity (void)
{
if(f_mount(&SDFatFS, (TCHAR const*)SDPath, 1) != FR_OK)
{
SendString("SD card mounting error");// Display capacity
Error_Handler();
}
else
{
#if 1
{
uint8_t buf[30];
sprintf(buf,"SD_Cap %llu \n\r", ((unsigned long
long)hsd1.SdCard.BlockSize * hsd1.SdCard.BlockNbr));
SendString(buf);
}
#endif
}
}
Dear Sir,
Sorry for the late reply. Actually i was on the leave due to some personal work.
I have seen your ioc.
Please find attached our ioc and check the configuration.
I have tested. It is not working.
Also please see the our function of the mounting of the SD card and Total space available of the SD card.
This function reply to us - SD card mounting error.
Please suggest any modifications required for the working ok.
Regards
Kameshwar Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 12:42 AM
Might not be a software issue​, your hardware implementation is not shown or described.
​
I​ssue isn't with superficial top level code, you're going to have to dig into the DiSKIO and SDIO code, perhaps instrumenting that to understand how it flows and breaks.
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
‎2022-11-24 1:10 AM
Thanks for your reply.
With same h/w SD fatfs is working ok with sdio 4bits in interrupt and poling mode without dma and freertos. So H/W is ok.
