Hi.
I tried to use the example Example MPC5777M DSPI_SimpleTXRX S32DS porting to MPC5777C SPI but I didn`t have success.
(DSPI_A instead of DSPI_0 and DSPI_B instead DSPI_2)
Unfortunately, no data is received by DSPI_A or DSPI_B.
Using the MPC57XXX Motherboard on MPC5777C-416DS and a logical analyzer, I am monitoring the PM7,PM8,PM6, PM13 to check the DSPI_A activity and PO2,PM15,PO0 and PM10 to check DSPI_B activity.
The wiring connection:
SINA PM7 -> PO2 SOUTB
SOUTA PM8 -> PM15 SINB
SCKA PM6 -> PO0 SCKB
PCSA0 PM13 -> PM10 PCSB0
Is there any modification on example to work on MPC5777C ? (clock configuration, pin assignment and etc )
Is that pin assignment correct ?
Thanks
Thiago.
Hi, DSPI initialization should be almost the same.
The difference may be in other startup as MPC5777C and MPC5777M are not simply compatible, thus new example should be based on MPC5777C startup.
With proper setting of SIU_PCRn and input routing as shown below it should work:
If it does not help, let me know further details.
Hi David.
It is working.
Thanks
Hi,
Am also facing same issue, I have ported the DSPI portion to MPC5777C example. Following are my initializations
/*DSPI_A Init(Master Mode)*/
DSPI_A.MCR.R = 0x80010001;//0x80010001
DSPI_A_CTAR0 = 0x7802100F;//0x78021004
/*Receive FIFO Drain Request enable*/
DSPI_A.RSER.B.RFDF_RE = 1;
/* Exit HALT mode: go from STOPPED to RUNNING state*/
DSPI_A.MCR.B.HALT = 0x0;
/*DSPI_B Init (Slave Mode)*/
/*Configured slave mode */
DSPI_B.MCR.R = 0x00000001;
DSPI_B.MODE.CTAR_SLAVE[0].R = 0x38000000;
DSPI_B_CTAR0 = 0x7802100F;//0x78021004
/*Receive FIFO Drain Request enable*/
DSPI_B.RSER.B.RFDF_RE = 1;
/* Exit HALT mode: go from STOPPED to RUNNING state*/
DSPI_B.MCR.B.HALT = 0x0;
/*GPIO*/
/*DSPI_A*/
SIU.PCR[96].R = 0x06DC; //DSPI_A_CS0 //Output
SIU.PCR[93].R = 0x06DC; //DSPI_A_SCK //Output
SIU.PCR[95].R = 0x06DC; //DSPI_A_SOUT //Output
SIU.PCR[94].R = 0x05DC; //DSPI_A_SIN //Input
/*DSPI_B*/
SIU.PCR[105].R = 0x05DC; //DSPI_B_CS0 //Input
SIU.PCR[102].R = 0x05DC; //DSPI_B_SCK//Input
SIU.PCR[104].R = 0x06DC; //DSPI_B_SOUT
SIU.PCR[103].R = 0x05DC; //DSPI_B_SIN //Input
The wiring connection:
SINA PM7 -> PO2 SOUTB
SOUTA PM8 -> PM15 SINB
SCKA PM6 -> PO0 SCKB
PCSA0 PM13 -> PM10 PCSB0
Trying transmit from Master to Slave its stopped at while((DSPI_A.SR.B.TCF == 0) || (DSPI_B.SR.B.TCF == 0))//Wait for Tx complete
{}
Could you pleas let me know what change made it work for you? .Possible can u share DSPI Init details ?
Thanks & Regards,
Sudheer A.
Hi,
Its Working Now.
Regards,
Sudheer A.