How to start SDIO interrupts?

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

How to start SDIO interrupts?

Jump to solution
1,457 Views
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

Tags (3)
0 Kudos
1 Solution
1,428 Views
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

 

View solution in original post

0 Kudos
3 Replies
1,451 Views
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 Kudos
1,443 Views
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 Kudos
1,429 Views
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 Kudos