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

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

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

跳至解决方案
2,603 次查看
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 项奖励
回复
1 解答
2,575 次查看
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 项奖励
回复
1 回复
2,576 次查看
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 项奖励
回复