MPC5674f SPI DSPI_POPR register

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5674f SPI DSPI_POPR register

跳至解决方案
950 次查看
mayconkruger
Contributor I

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

标签 (1)
标记 (1)
1 解答
716 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is typical behavior for overflow/underflow situation. It is needed to realize that every PUSH is needed to along with POP operation as both receive/transmit operation works simultaneously.

 

In the thread below you may see example code for reference:

https://community.nxp.com/thread/381921

在原帖中查看解决方案

1 回复
717 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is typical behavior for overflow/underflow situation. It is needed to realize that every PUSH is needed to along with POP operation as both receive/transmit operation works simultaneously.

 

In the thread below you may see example code for reference:

https://community.nxp.com/thread/381921