How to start SDIO interrupts?

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

How to start SDIO interrupts?

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

Hello,

I create my own SDIO project for LPC54607.

I use 4-bit mode of communication and I have no issues reading card Capability on so on. The standard commands and data sending works fine.

I would like to use interrupts in my project, being still in 4-bit mode. As know from SDIO spec, the interrupts should appear on Data1 line (voltage being pulled down by SDIO card).

 

My problem is that I can not get my program to execute SDIO_IRQHandler function.

I have a part of code for interrupt registration:

NVIC_SetPriority(SDIO_IRQn, 5U);
NVIC_EnableIRQ(SDIO_IRQn);
SDIO_EnableIOInterrupt(card, kSDIO_FunctionNum1, enable);
SDIO_EnableIOInterrupt(card, kSDIO_FunctionNum2, enable);
SDIO_SetIOIRQHandler(card, kSDIO_FunctionNum1, handler);
SDIO_SetIOIRQHandler(card, kSDIO_FunctionNum2, handler);

Is there anything else I should run to start handler function after interrupt? Maybe something with GPIO interrupts?

 

Thanks,

Piotr

标记 (3)
0 项奖励
回复
1 解答
2,062 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello PIHL,

How about refer to how to config interrupt sdcard_interrupt project, especially the function of 

SDIF_TransferCreateHandle()

Alice_Yang_0-1622625604706.png

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,085 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello PIHL,

How about refer to the interrupt code under SDK for LPCxpresso54608  SDIO demo,

download from:

https://mcuxpresso.nxp.com/en/select  

 

 

 

0 项奖励
回复
2,077 次查看
PIHL
Contributor II

Hello Alice,

thanks for the response.

I looked into examples for LPC 546xx MCUs and I didn't find the answer. 

In "sdcard_interrupt" and "mmccard_interrupt" during transmission there is function SDMMC_OSAEventWait used to capture events. Are those events somehow connected with the SDIO interrupts? Should I expect something similar with SDIO?

In the example called "sdio" I can not find any use of interrupts in communication.

Thanks,

Piotr

0 项奖励
回复
2,063 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello PIHL,

How about refer to how to config interrupt sdcard_interrupt project, especially the function of 

SDIF_TransferCreateHandle()

Alice_Yang_0-1622625604706.png

 

0 项奖励
回复