SDMMC_OSADelay() not working properly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SDMMC_OSADelay() not working properly

跳至解决方案
555 次查看
angelo_76
Contributor I

Hi all!

We are working on a project based on IMXRT1050 – EVKB where fatfs is implemented using SDcard, according to NXP example.

We are facing a stranger behavior regarding SDMMC_OSADelay() function, when instead delay milliseconds, it take several minutes.
The stranger thing is when this happens. The fact to add or remove some code from anywhere from software, causes the SDMMC_OSADelay() to work well or not.

Example when everything works fine, including Sdcard:

Hw_and_sw_initialization();
SD_PollingCardInsert();
Foo_func(); //this function just return 1.

Example when SDMMC_OSADelay() take minutes:

Hw_and_sw_initialization();
SD_PollingCardInsert(); // software get stuck here for several minutes, and when continue, SDcard is not working.
//Foo_func(); //this function just return 1.

Any help will be welcome!

Best regards,

Angelo.

 

标签 (1)
0 项奖励
回复
1 解答
505 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hi @angelo_76 

Thanks for the clarification!  I see that you are using the baremetal implementation relying on the SDK_DelayAtLeastUs

diego_charles_0-1698183447404.png

 

Please help me testing  DWT and check  if the delay given to this function is not too big, try  a smaller value. 

Below an example screenshot using RT1064 and MCUXpresso. 

diego_charles_1-1698191428759.png

 

 

Best regards,

Diego

在原帖中查看解决方案

0 项奖励
回复
3 回复数
533 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hi @angelo_76 

I hope you are doing fine.

Please, try to increase the heap area for your RTOS application. Let's check if this has an effect on the behaviour of this function. 

All the best,

Diego

0 项奖励
回复
520 次查看
angelo_76
Contributor I

Hi @diego_charles !

 

Thanks for the response, but in this case, I'm running on bare metal.

0 项奖励
回复
506 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hi @angelo_76 

Thanks for the clarification!  I see that you are using the baremetal implementation relying on the SDK_DelayAtLeastUs

diego_charles_0-1698183447404.png

 

Please help me testing  DWT and check  if the delay given to this function is not too big, try  a smaller value. 

Below an example screenshot using RT1064 and MCUXpresso. 

diego_charles_1-1698191428759.png

 

 

Best regards,

Diego

0 项奖励
回复