SPI RxData event not found in S32K344

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

SPI RxData event not found in S32K344

588 Views
Hareesh
Contributor I

Hi NXP team,

We are using S32K344 EVK board and S32 design studio 3.5.

We configured a simple LPSPI driver to transfer and receive the data through SPI communication.

The ISR has the following event checking options:

typedef enum
{
    LPSPI_IP_EVENT_END_TRANSFER = 0, /**< The transfer is successfully done. */
    LPSPI_IP_EVENT_FAULT = 1         /**< The transfer failed due to overflow/underflow. */
} Lpspi_Ip_EventType;

 

Nevertheless, the ISR does not provide event checking for received data.

How can we obtain the interrupt each time a slave device sends data to us?

 

Best regards,

Hareesh

Labels (3)
0 Kudos
Reply
1 Reply

559 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Hareesh,

Please refer to the discussion in SPI Lpspi_Ip_AsyncTransmit not work

as I wrote, for async function you need to wait for end of transfer. Function just prepare transmission/reception and leave. So either you will check module status using Lpspi_Ip_GetStatus, it returns IDLE after transfer is finished. Or if you define callback within Async function, this callback will be called with event LPSPI_IP_EVENT_END_TRANSFER after transfer is done.

Lpspi_Ip_AsyncTransmit SPI_Callback.png

If the TX data are don't care, customer can use half duplex transfers. There is an api for that Lpspi_Ip_AsyncTransmitHalfDuplex TransferType=LPSPI_IP_HALF_DUPLEX_RECEIVE, also examples are available in the RTD (Lpspi_Ip_HalfDuplexTransfer_S32K344).


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply