uSDHC module initiate take too long (5 seconds)

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

uSDHC module initiate take too long (5 seconds)

721 Views
dany_amsalem
Contributor II

Hello

I'm working on the DEVKIT MPC5748G rev D under the S32 IDE, using SDK 2.0.

my current SDK:

         S32 Design Studio MPC574xx and S32R SDK RTM 2.0.0 1.0.0.201812191911          com.nxp.s32ds.cross.sdk.S32PA_2.0.0.brc.feature.group NXP

the uSDHC module has initiate cycle long as 5 seconds time, which is very long time for our product.

I found that the define of this 5 seconds  uSDHC_TC_TIMEOUT_MS in file usdhc_impl.c responsible for it, changing this define to 1 second results sometime to its task to stuck. in all my tries only value with this define set to 5 seconds results OK.

my questions are:

1. is it a known issue ? do you have any fix for that?

2. why it behaves as a delay and not as a timeout, most of times it works with 1 second (even less). why it not break out and save time in initiate uSDHC module ? (it uses its 5 seconds all the time)

Thanks in advance

Dany

0 Kudos
2 Replies

611 Views
dany_amsalem
Contributor II

Hi 

I had some some progress in this issue

it appears that card presence DAT3 doesn't work, moreover, it stuck sometimes in uSDHC_IsSDCardPresent() function. this issue fixed after
changing card presence gpio into the other option CD_SW PA1 GPIO. and use other dirty code to read PA1 in uSDHC_IsSDCardPresent().

see below pictures.

another issue I have now with this module refer to power supply sourcing, it works just fine with the MicroUSB  and fails with the 12V source (jumpers changed accordingly to each source). digging in , it looks like that transfer function fails in timeout after semaphore timeout expired in uSDHC_DRV_TransferBlocking() function.

Any idea why uSDHC works when powered with microUSB and fails with the 12V source ?  

 

BR

Dany

pastedImage_1.png

pastedImage_2.png

0 Kudos

611 Views
lior_baz
Contributor II

Joining this question - same product, same SDK version:

The SD boot takes sometimes (it's not consistent) as long as 5 seconds time.

 

Any advise? Anyone? :smileyhappy:

0 Kudos