SDMMC_OSADelay() not working properly

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDMMC_OSADelay() not working properly

Jump to solution
669 Views
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.

 

Labels (1)
0 Kudos
Reply
1 Solution
619 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
647 Views
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 Kudos
Reply
634 Views
angelo_76
Contributor I

Hi @diego_charles !

 

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

0 Kudos
Reply
620 Views
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 Kudos
Reply