Delay in SDIO CMD53 Read

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
KrPa_4189911
Level 1
Level 1
First like given

Hello KandlaguntaR_36,

Using MANUAL_DMA, SIB to UIB Channel, I am trying to read card data using SDIO interface but I couldn't get the desired speed.

So I probed hardware and checked SDIO DATA lines and CMD Line in the oscilloscope and found some unknown huge delays between two consecutive CMDs.

I have attached snapshots for both CMD and DATA lines profiles. In that, I have mentioned times for each CMD Txs and Unknown delays. Also attached host application code snippet. (setup is like, Requesting to read 1024 Bytes @ 52MHz SIB_FREQ, USB2.0 High Speed.)

Is it possible to reduce/eliminate delays?

Thanks

Krunal Patel

0 Likes
1 Solution

Hello Krunal,

If you go with AUTO DMA Channel instead MANUAL DMA Channel, it can be reduced upto 40 us delay.

Rest all delay comes with the implementation of SDIO in FX3S which cannot be modified now.

Regards,

Sridhar

View solution in original post

0 Likes
3 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Krunal,

Can you please point me to the snippet you used for the test - the two CMD TX?

Regards,

Sridhar

0 Likes
lock attach
Attachments are accessible only for community members.

Shridhar,

Code Sequence is like:

1. wait_for_gpio( );  -- Wait for GPIO interrupt (to indicate data is ready to read by the host)

2. CyU3PSdioByteReadWrite( ); -- CMD52 WRITE: Update Handshake Bit to Slave (0x1 received GPIO interrupt flag)

3. CyU3PSdioExtendedReadWrite( ); -- CMD53 WRITE: Update Base register of SDIO (with SFIFO)

4. CyU3PSdioExtendedReadWrite( ); -- CMD53 READ: Read DATA from SFIFO

5. while(CyU3PSibIsDeviceBusy(PortId_0)); -- Wait until Card getting out of busy state

6. CyU3PSdioExtendedReadWrite( ); -- CMD53 WRITE: Update Base register of SDIO (with Memory Addr)

7. CyU3PSdioByteReadWrite( ); -- CMD52 WRITE: Update Handshake Bit to Slave (0x2 read complete flag)

PFA

Thanks

Krunal Patel

0 Likes

Hello Krunal,

If you go with AUTO DMA Channel instead MANUAL DMA Channel, it can be reduced upto 40 us delay.

Rest all delay comes with the implementation of SDIO in FX3S which cannot be modified now.

Regards,

Sridhar

0 Likes