MKV31F128VLL10 - SPI

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

MKV31F128VLL10 - SPI

539 Views
Deejay
Contributor III

Hi,

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?

Thanks.

DJ

Labels (1)
0 Kudos
1 Reply

355 Views
isaacavila
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?

Regards,

Isaac

0 Kudos