When p1020 access switch chip by espi interface, sometimes it reports interrupt frequently about 100,000 times per second, and the spi controller can't work normally.
We dump the espi register as below:
0xffe07000 0x80000403
0xffe07004 0x0020e900
0xffe07008 0x00000000
0xffe0700c 0x00000000
0xffe07010 0x00000000
0xffe07014 0xffffffff
0xffe07018 0x00000000
0xffe0701c 0x00000000
So it seems the espi controller enter into an abnormal situation. How can I fix it?
已解决! 转到解答。
Please make sure SPIE register is always cleared before returning from interrupt handler.
The dump you submitted shows the situation where RXT=1 while RNE=0, that means RXT bit was not cleared by software.
Please let me remind, RXT bit is sticky bit, it must be cleared explicitly by user software by writing "1" to it.
Have a great day,
Alexander
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Please make sure SPIE register is always cleared before returning from interrupt handler.
The dump you submitted shows the situation where RXT=1 while RNE=0, that means RXT bit was not cleared by software.
Please let me remind, RXT bit is sticky bit, it must be cleared explicitly by user software by writing "1" to it.
Have a great day,
Alexander
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------