Hi All, martinkovar
As we are working on the SPI driver for MPC5777M, we could successfully transfer data and communicating with
the external peripherals, But i am not sure how does the slave send the response data to the master . Because in SPI protocol, the clock is controlled by master, for a successfull data transfer we need clock, as the clock doesnt have control over clock,
(1) How will the slave SPI module sends the response to the Master SPI module.
(2) Could anyone specify the steps to be taken while initiate the data transfer from slave to master.
Thanks & Regards
Here you may see example code you could use as inspiration for your SPI drive development:
SPI works the way that during transfer from master to slave (clocked by master), slave sends data back to master (master exchanges data with slave). If master wants to read data, sends dummy word (in order to clock slave device) and receives data.
Thanks David, the article you shared explains exactly how slave response works. It worked with my code too.