SDIO transfer gets stuck

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SDIO transfer gets stuck

853件の閲覧回数
goldbach
Contributor I

Board: LPC54S018-EVK

Hello,

I'm currenty facing a puzzling issue where sometimes the blocking SDIO transfers (using CMD53 w/ byte mode) get stuck in the `SDIF_WaitCommandDone` loop.

`SDIF_TransferBlocking` with `dmaConfig = NULL` sets up the command with `SDIF_SendCommand` and then calls `SDIF_WaitCommandDone` to wait until it succeeds or an error is detected. What I'm seeing is that sometimes the MCU keeps looping forever in `SDIF_WaitCommandDone` as `MINSTS` value is `0x400`, the host timeout error flag, which is not recognized as such and thus is not making the loop stop.

The error can be observed when the SDIO card is working in HS mode (~48MHz) and also in the normal mode (~25MHz).

In order to perform a byte-read using CMD53 I'm currently setting the block size to the desired byte value (less than the defined block size for func0/func1) and number of blocks equal to one, perhaps that's what's causing this problem?

I'm running out of ideas and time to debug this problem, any hint or guidance is greatly appreciated.

G.

ラベル(2)
0 件の賞賛
返信
5 返答(返信)

820件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @goldbach 

Could you please confirm the board name is "LPC52S018-EVK"? Is it customized ?

 

BR

Alice

0 件の賞賛
返信

817件の閲覧回数
goldbach
Contributor I

More a typo, the correct name is LPC54S018-EVK.

0 件の賞賛
返信

770件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @goldbach 

Could you please tell how to reproduce your issue on LPC54S018-EVK board, includes the details steps, 

thanks.

 

BR

Alice

0 件の賞賛
返信

760件の閲覧回数
goldbach
Contributor I

The problem is not easy to replicate as it requires a WiFi SDIO module and some specific code, I'm currently using the `sdmmc` middleware library for communicating with the module.

The problem seems to appear only whenever a CMD53 is issued with a transfer size that's greater than the FIFO length. The `SDIF_WaitCommandDone` function is stuck after `SDIF_SendCommand` returns as somehow the SDIF controller is only raising the HTO (0x400) flag but no CDONE nor RE nor any other flag.

This is interesting as the HTO should interest only the data portion of the communication and not the command one, perhaps the SDIO module is too eager in sending out the data?

0 件の賞賛
返信

708件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @goldbach 

Yes, it really hared to reproduce, because there isn't SDIO wifi module on my side.

About SDIO module, only can  recommend you have a look at the sdio demo under SDK, you can 

first check how  it (SDIF_WaitCommandDone` function is stuck after `SDIF_SendCommand` returns ) works on SDK demo.

 

BR

Alice

 

0 件の賞賛
返信