MPC5674f SPI DSPI_POPR register

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5674f SPI DSPI_POPR register

ソリューションへジャンプ
947件の閲覧回数
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 解決策
713件の閲覧回数
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 返信
714件の閲覧回数
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