SDIO Interrupt mode - OSAEvent error

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

SDIO Interrupt mode - OSAEvent error

跳至解决方案
2,290 次查看
PIHL
Contributor II

Hello,
I am having an issue with SDIO communication. I am using interrupt mode with 4 data lines and high speed.
My program tries to interface with SDIO device and the commands are working properly.
Unfortunately sometimes the communication fails - it always happend at the exact same moment of running the program.

I use functions:
SDMMC_OSAEventClear
SDIF_TransferNonBlocking
SDMMC_OSAEventWait

The last one is getting Error event from the SDIO bus. Evant value 14 (1110 in binary), meaning I get SDMMC_OSA_EVENT_TRANSFER_CMD_FAIL, SDMMC_OSA_EVENT_TRANSFER_DATA_SUCCESS and SDMMC_OSA_EVENT_TRANSFER_DATA_FAIL.

What may cause such a behaviour? The command used is 53, with argument 603979780, reading register. This command is happening diretly after writing data using block mode.

Thanks,
Piotr

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
2,193 次查看
PIHL
Contributor II

Hello,

I found out that the issue was in the code that I implemented myself. Long story short - in bulk data transfer I was calculating data size incorrectly.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,194 次查看
PIHL
Contributor II

Hello,

I found out that the issue was in the code that I implemented myself. Long story short - in bulk data transfer I was calculating data size incorrectly.

0 项奖励
回复
2,283 次查看
Abernathy
Contributor I

The ESP32 SDIO Card peripherals (Host, Slave) shares two sets of pins as below table. The first set is usually occupied by SPI0 bus which is responsible for the SPI flash holding the code to run. This means SDIO slave driver can only runs on the second set of pins while SDIO host is not using it.

jcpenneykiosk login

0 项奖励
回复
2,285 次查看
frank_m
Senior Contributor III

> This command is happening diretly after writing data using block mode.

A write will take some time on a MMC device, like with internal Flash. Basically, these are similar technologies.

I didn't work with OSA yet, but you might need to check the status, or wait.

0 项奖励
回复