AnsweredAssumed Answered

KL27z: SPI slave may skip msb of byte to transmit

Question asked by gartin on May 25, 2018
Latest reply on Jun 7, 2018 by Kerry Zhou


I have the spi slave initialized and configure to generate interrupts on kSPI_RxFullAndModfInterruptEnable which works so far. If I load the tx register with one byte (lets name it tx1) and the master initiates a one byte transfer, he receives tx1. Now if I load another byte (tx2) into the tx register, this time in the rxfull-interrupt handler (based on the previous received byte/command), the msb of this byte tx2 got skipped. So if tx2 is 0xFF, 0x7F is transmitted.

The same applies to if I start a dma transfer in the rxfull-interrupt. the msb of the first byte got skipped.

It's always the msb regardless of the msb-/lsb-first setting of the spi unit.

Is this a know behavior or is there a fundamental error in my code?