SPI_MasterTransfer non blocking function, how to detect Master transfer is completed over SPI ?

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

SPI_MasterTransfer non blocking function, how to detect Master transfer is completed over SPI ?

Jump to solution
1,306 Views
Saitej
Contributor IV

Hello 

Here am using SPI PAL driver with PE configuration, am i need to non blocking function call transferring data over SPI. but would like to get notified when SPI transaction is done.

please help me on how to achieve it.

Thanks in advance !.

0 Kudos
1 Solution
1,278 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Saitej,

When you set the SPI to call a callback is possible to achieve this. If you set a name to the callback:

Alexis_A_0-1609359718068.png

And in your main code you will need to set a function with the following syntax:

SPI1_Callback(void *driverState, spi_event_t event, void *userData);

In the event parameter, the SPI_EVENT_END_TRANSFER event is called if the transfer is finished.

Let me know if this helps you.

Best Regards,

Alexis Andalon

View solution in original post

0 Kudos
1 Reply
1,279 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Saitej,

When you set the SPI to call a callback is possible to achieve this. If you set a name to the callback:

Alexis_A_0-1609359718068.png

And in your main code you will need to set a function with the following syntax:

SPI1_Callback(void *driverState, spi_event_t event, void *userData);

In the event parameter, the SPI_EVENT_END_TRANSFER event is called if the transfer is finished.

Let me know if this helps you.

Best Regards,

Alexis Andalon

0 Kudos