Hello NXP
I am working on S32K148 for SPI
How to configure SPI in master mode only and how to check the output result
I don't have any slave Device.
Is there any sample code?
please take a try the demo:lpspi_transfer_s32k148
The application uses two on board instances of LPSPI, one in master configuration and the other one is slave to communicate data via the SPI bus. Data will be gathered periodically from the ADC input and will be sent to the master device which transforms it into a PWM signal. In this way the potentiometer controls the LED intensity.
I have tested this routine and the waveforms tested by the oscilloscope are all working fine!
What data are we actually sending in this
an 8-bit data:
uint8_t slaveDataSend;
slaveDataSend = (uint8_t)adcRead;
LPSPI_DRV_SlaveTransfer(RECEIVE, &slaveDataSend, &slaveDataReceive, BUFFER_SIZE);