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
已解决! 转到解答。
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
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
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]
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
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...!!!
MAYANK THAKOR
Email:- mayankdthakor@gmail.com