Hi, I am currently developing one application to read from a external spi memory (code anexed).
I've configured DSPI module as SPI, and disabled TX/RX FIFO's(on the SPI_Init function).
The problem is when I first try to read from DSPI_POPR register I get only 0 as the returned value. But the second time I try reading the DSPI_POPR I get the expected value which as stored in the external memory. So, I dont understand why do I have to read DSPI_POPR register twice to get the expected value.
I also had to use the ROOE flag from DSPI_MCR register, otherwise the data received by DSPI_POPR =0
MPC5674F_REG_DSPI_A.MCR.B.ROOE = 1; //why is this overflow flag necessary???
Original Attachment has been moved to: Spi.c.zip