SPIS: last byte missing if JTAG RTT disabled, otherwise ok

We are using an nRF5340 board as SPI slave to receive a 7 byte frame @500KHz bus, 250 frames/sec.

The frames contain a counter, so we can see if we missed frames and have an otherwise known content.

The problem we have is that if we use JTAG RTT to view the log on the Nordic, it works fine (we receive all

frames, none missing). Once we turn off RTT, we receive only frames with 6 bytes (instead of 7)!!

We tried:

- changing IRQ prio

- changing Peripheral (SPIS1, SPIS2, SPIS3)

Any idea what could cause this??

Update: We use CPHA 0, CPOL 0.  Our transfer, as seen on the Logic analyser:

Update2: Having the CS go active a few usec earlier (in relation to Clk/Mosi) also changes the result of the SPIS, even while it should only sample on the rising clock flanks in this case.

Related