hi i am trying to concatenate two 8-bit data frames by using DSPI_A(MASTER) and in loopback mode i want to receive single 16-bit data frame in DSPI_B(SLAVE) module. The following is the my code, but i am not receiving the data
#define TX_DATA_MASTER1 0x12u
#define TX_DATA_MASTER2 0x34u
#define TX_DATA_SLAVE 0x9876u
vuint32_t ui32_rx_data_master;
vuint32_t ui32_rx_data_slave;
void D_DSPI_loopback (){
ui32_rx_data_master = 0;
ui32_rx_data_slave = 0;
// Assigning pin configaration for input port of SPI_A
SIU.PCR[93].R = 0x0600; //SCKA
SIU.PCR[96].R = 0x0600; //PCSA0
SIU.PCR[95].R = 0x0600; //SOUTA
SIU.PCR[94].R = 0x0500; //SINA
SIU.PCR[103].R = 0x0500; //SINB
SIU.PCR[104].R = 0x0600; //SOUTB
SIU.PCR[102].R = 0x0500; //SCKB
SIU.PCR[105].R = 0x0500; //PCSB0
SIU.DISR.R = 0x40540000; // Definition of SPI_A & SPI_B parameters
DSPI_A.MCR.R = 0x800F0001;
DSPI_A.MODE.CTAR[0u].R = 0x2A0A7727u;
DSPI_A.MCR.B.HALT = 0x0u;
DSPI_B.MCR.R = 0x000F0001u;
DSPI_B.MODE.CTAR[0u].R = 0x7A0A7727u;
DSPI_B.MCR.B.HALT = 0x0u;
DSPI_B.PUSHR.PUSHR.R = 0x00000000u|TX_DATA_SLAVE;
DSPI_A.PUSHR.PUSHR.R = 0x80010000u|TX_DATA_MASTER1;
DSPI_A.PUSHR.PUSHR.R = 0x08010000u|TX_DATA_MASTER2;
while (DSPI_A.SR.B.RFDF != 1u)
{}
ui32_rx_data_master = DSPI_A.POPR.R;
DSPI_A.SR.R = 0x90020000u;
while (DSPI_B.SR.B.RFDF != 1u)
{}
ui32_rx_data_slave = DSPI_B.POPR.R;
DSPI_B.SR.R = 0x90020000u;
}
please let me know any corrections are there?