Example code for FLEXSPI_TransferNonBlocking usage

cancel
Showing results for 
Search instead for 
Did you mean: 

Example code for FLEXSPI_TransferNonBlocking usage

250 Views
ebodek
Contributor II

Hello,

I didn't find any example code for using FLEXSPI_TransferNonBlocking

SDK examples all use FLEXSPI_TransferBlocking.

 

Can someone point me to relevant example code for i.MXRT1050?

Thank you.

Labels (1)
0 Kudos
3 Replies

220 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

please refer to below code snippet.

-Initialize
FLEXSPI_Enable(((FLEXSPI_Type *)FLEXSPI_BASE), true);
FLEXSPI_GetDefaultConfig(&config);
FLEXSPI_Init(((FLEXSPI_Type *)FLEXSPI_BASE), &config);

 

flexspi_handle_t rc_handle;
flexspi_handle_t tr_handle;

FLEXSPI_TransferCreateHandle(((FLEXSPI_Type *)FLEXSPI_BASE), &tr_handle, NULL, 0
/*flexspi_transfer_callback_t callback,
void *userData*/);

FLEXSPI_TransferCreateHandle(((FLEXSPI_Type *)FLEXSPI_BASE), &rc_handle, NULL, 0
/*flexspi_transfer_callback_t callback,
void *userData*/);

-Read QSPI.
status = FLEXSPI_TransferNonBlocking(((FLEXSPI_Type *)FLEXSPI_BASE), &rc_handle, &rc_data);

while((status = FLEXSPI_TransferGetCount (((FLEXSPI_Type *)FLEXSPI_BASE), &rc_handle, &count )) == kStatus_FLEXSPI_Busy);

 

 

Regards

Daniel

0 Kudos

124 Views
arunmuthuganesh
Contributor I
Hi Daniel,

Can you please share the code snippet for QSPI write in NonBlocking transfer mode ?
 
Thanks in Advance,
Arun Muthuganesh
0 Kudos

45 Views
senthil_kumarn
Contributor I

dear daniel

 

please share the code snippet for QSPI write in NonBlocking transfer mode

0 Kudos