DSPI_2 SIN (MISO) not working (MPC56x4P)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DSPI_2 SIN (MISO) not working (MPC56x4P)

724 Views
aperico
Contributor I

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;

Labels (1)
0 Kudos
Reply
1 Reply

476 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It seems you have forgotten to configure PSMI registers. These registers are being used for routing between Input pads and particular peripheral’s input. Pay attention to chapter 11.5.2.9 in device’s RM.

0 Kudos
Reply