Hello everyone,
I am a first time user of S32K312 and am not familiar with the S32DS development environment, so I would like to get some help.
I want to communicate with LPSPI2 using PTB2(SIN) and PTB29(SCK) pins. (PSC pin is not used.)
And, I want to transmit multiple bytes of 8-bit data continuously using Lpspi_Ip_AsyncTransmitHalfDuplex().
Sometimes I only transmit, and sometimes I transmit and receive continuously.
1. How do I set it up using S32DS3.5 and SDK?
2. When transmitting multiple bytes with SPI, how do I output continuously without latency between bytes?
3. How do I do SPI Rx(DMA) after SPI Tx(DMA)?
Hi @MOMO6389,
Refer to this RTD 3.0.0 example: https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-SPI-Transmit-amp-Receive-Using-DMA-...
You need to change it from full-duplex to half-duplex and reconfigure the ports.
Regards,
Daniel
HI @MOMO6389,
The DMA configuration is the same as in the full-duplex mode.
It uses the same registers, flags etc.
And it is all managed by the driver.
So, if you call the transmit function, the LPSPI TX DMA channel is used to transfer the data.