Unable to transmit data to slave on P1020RDB using eSPI

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

Unable to transmit data to slave on P1020RDB using eSPI

ソリューションへジャンプ
2,470件の閲覧回数
bilalwasim
Contributor II

Hi everyone. I'm trying to write SPI driver for P1020RDB, which has support for eSPI. I've followed the initialization sequence as is mentioned in the TRM, but am unable to even get data out onto the wire. My initialization sequence is as follows,

1 - I enable the SPI device by clearing the SPI bit in the device disable register.

2 - I clear all the previous events by resetting the SPI_Event register.

3 - I set up the baud rate, and the character size, along with clock phase, polarity and slave select polarity.

4 - I clear the mask and command register, and set SPI_Mode register to 0x8000100F which enables my module.

Then, I try to write a byte to the slave by putting my data in the transmit FIFO register. However, the data never ever gets to the MOSI wire. What could be the possible problems. Is there something wrong with my initialization sequence?

Any help would be appreciated.

Thanks,

ラベル(1)
0 件の賞賛
返信
1 解決策
2,245件の閲覧回数
Pavel
NXP Employee
NXP Employee

Look at attached file. It is simple eSPI program example. It is CodeWarrior project for the P5020 board. Similar code can be used for the Pp1010. See eSPI initialization and using in main.c file.

Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
2,246件の閲覧回数
Pavel
NXP Employee
NXP Employee

Look at attached file. It is simple eSPI program example. It is CodeWarrior project for the P5020 board. Similar code can be used for the Pp1010. See eSPI initialization and using in main.c file.

Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信