MPC5777M as a SLAVE SPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5777M as a SLAVE SPI

跳至解决方案
1,704 次查看
mayanksinhthako
Contributor II

Hello,

Currently I am working on SPI driver based communication between MPC5748G and MPC5777M. I configured MPC5748G as a Master and MPC5777M as slave with 1 MBPS Baurdrate for both.We are able to transfer data From MPC5777M(Master) and MPC5748G as a SLAVE and we are able to receive ACK also.But When Configured 5748G as MASTER and 5777M as SLAVE , we are unable to get data from both sides.We are tried different ways but went in vain,  I am not able to solve , Can you please help me how to solve or any idea why it is happening 

Regards,

Mayank Thakor

1 解答
1,216 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi Mayank,

I tested your code on EVBs and it is working.

I had only troubles with writing to the MSCR_MUX registers on the MPC5777M.

I used S32DS rev 1.0 and the byte access to MSCR_MUX registers does not work. This is fixed in later S32DS version, I think. However the byte access should not be used for MSCR_MUX registers (as per the RM), use rather register access.

 

So check the SIUL configuration with a debugger, if all is properly written.

BR, Petr

在原帖中查看解决方案

4 回复数
1,216 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi Mayank,

There should be no big difference when you swap the functionality.

Just be sure the pins are properly configured, SCK and PCS will have opposite direction (input vs. output).

If you will have a doubts still, please share SPI and pins configuration code and connection diagram.

BR, Petr

1,216 次查看
mayanksinhthako
Contributor II

Hello PetrS,

            I checked with GPIO configuration but still I am not getting the output so I attached my code MPC5748G as a Master and MPC5777M as a slave so please check the code and give me suggestion what change is required.

 Pin connection's of Master (DSPI_0) Module Slave (DSPI_0) Module

   MPC5748G                                                          MPC5777M

CS<->SS PA[15]         CS <------------------------------->SS PE[5]

SCK<->SCK PA[14]   SCK<------------------------------->SCK PJ[15]

SOUT<->SIN PA[13]  SOUT<------------------------------>SIN PK[13]

SIN<->SOUT PA[12]  SIN<------------------------------->SOUT PD[5]

0 项奖励
回复
1,217 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi Mayank,

I tested your code on EVBs and it is working.

I had only troubles with writing to the MSCR_MUX registers on the MPC5777M.

I used S32DS rev 1.0 and the byte access to MSCR_MUX registers does not work. This is fixed in later S32DS version, I think. However the byte access should not be used for MSCR_MUX registers (as per the RM), use rather register access.

 

So check the SIUL configuration with a debugger, if all is properly written.

BR, Petr

1,216 次查看
mayanksinhthako
Contributor II

Hello PetrS

                 Thank you for your reply and we are able to solve the issues with your suggestion and common ground connection between two boards.

Thank you very much...!!!

Regards:

MAYANK THAKOR

Email:- mayankdthakor@gmail.com

0 项奖励
回复