Reading SPI Master Respose data in MPC5777M

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Reading SPI Master Respose data in MPC5777M

1,039件の閲覧回数
sandeepnagaraja
Contributor III

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

Sandeep Nagarajan

2 返答(返信)

840件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Here you may see example code you could use as inspiration for your SPI drive development:

https://community.nxp.com/thread/381921

 

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.

pastedImage_1.png

840件の閲覧回数
sandeepnagaraja
Contributor III

davidtosenovjan

Thanks David, the article you shared explains exactly how slave response works. It worked with my code  too.

0 件の賞賛
返信