AnsweredAssumed Answered

MKV31F128VLL10 - SPI

Question asked by Devan Jeyadevan on Mar 16, 2016
Latest reply on Mar 22, 2016 by isaacavila


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?