Unable to transmit data to slave on P1020RDB using eSPI

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

Unable to transmit data to slave on P1020RDB using eSPI

Jump to solution
968 Views
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,

Labels (1)
0 Kudos
1 Solution
743 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
744 Views
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 Kudos