MKV31F128VLL10 - SPI


MKV31F128VLL10 - SPI

347 次查看
Contributor III


I have run into a very critical issue with SPI in the Kinetis device MKV31F128VLL10 when interfaced with an SPI EEPROM M95M02.

The eeprom expects most significant bit to be sent first so I have configured the device using PE expert to do that. Now the problem is every time a byte is sent out, the interrupt flag is raised when the first bit is sent (which happens to be most significant bit in our case) and the chip gets de-selected causing transmission failure. I have tried to use the transmit buffer empty flag as well as interrupts but with no success.

A second problem (not a critical one) is where the receive buffer does not overwrite on the last received byte even though the buffer size configured is 0. So I continuously read  dummy bytes as I am sending out. Again I am not sure if this something to do with Processor expert(Kinetis Studio) or feature of the actual silicon.

I am not sure whether this is due to code generated by Kinetis compiler (Processor Expert) or it is a bug in silicon that is not documented anywhere. I have already invested a whole week for just a simple interface with SPI EEPROM in trying to get to the bottom of this and could only get it to work with delays. It is not a nice solution because I am unable to use interrupts and have to waste processor time in delay cycles.

I wonder if there is any solution/workaround for this?



标签 (1)
0 项奖励
1 回复

163 次查看
NXP Employee
NXP Employee

Hello Devan,

Which interrupt flag is risen when the first bit is sent? It is the same when driver is configured as LSB first?

Could you please be so kind to attach your project?



0 项奖励