AnsweredAssumed Answered

DSPI_2 SIN (MISO) not working (MPC56x4P)

Question asked by Armando Perico on Oct 20, 2015
Latest reply on Oct 26, 2015 by David Tosenovjan

Hi,

 

I am having problems on receving data from SIN from DSPI_2 and cannot move further with my application.

 

I send data normally on SOUT (MOSI) and can see on the osciloscope when comes on the SIN pin, the processor sets the flag "RFDF=1" and "RXCTR = 1" but the RX registers are always 0.

 

I have tried different configuration approaches and the result is always the same:

The status registers shows that there is new data available on the SPI

 

DSPI2SR:

   RXCTR = 1

   RFDF  = 1


but on the receiving register it comes always 0 ->  DSPI2POPR = 0.

DSPI2POPR = 0

DSPI2RXFR0 = 0

DSPI2RXFR1 = 0

DSPI2RXFR2 = 0

DSPI2RXFR3 = 0

 

 

I have checked the physical connections of the SIN pin and is all working fine.

I also have set the SIN PIN to normal GPIO (as input) and managed to read the input normally.

 

Considering that it could have been a problem on the DSPI_2 module of that specific CHIP, I have changed the processor with a new one and the behavior is exaclty the same.

 

Has anyone already faced a similar problems ?

 

Thanks in advance.

 

----------------------

PINS config:

----------------------

 

#define DSPI2_CS0_PCR 10 // a[10]

#define DSPI2_SCK_PCR 11 // a[11]

#define DSPI2_SOUT_PCR 12 // a[12]

#define DSPI2_SIN_PCR 13 // a[13]

 

SIU.PCR[DSPI2_SCK_PCR].B.PA     = 1;    

SIU.PCR[DSPI2_SCK_PCR].B.OBE = 1;

SIU.PCR[DSPI2_SCK_PCR].B.SRC = 1;

 

SIU.PCR[DSPI2_SOUT].B.PA  = 1;    

SIU.PCR[DSPI2_SOUT].B.OBE = 1;

SIU.PCR[DSPI2_SOUT].B.SRC = 1;

 

SIU.PCR[DSPI2_CS0_PCR].B.PA  = 1;    

SIU.PCR[DSPI2_CS0_PCR].B.OBE = 1;

SIU.PCR[DSPI2_CS0_PCR].B.SRC = 1;

    

SIU.PCR[DSPI2_SIN_PCR].B.IBE = 1;

SIU.PCR[DSPI2_SIN_PCR].B.SRC = 1;

SIU.PCR[DSPI2_SIN_PCR].B.WPE = 1;

SIU.PCR[DSPI2_SIN_PCR].B.WPS = 1;

Outcomes