The issues happen when RXD.MAXCNT = 1 and TXD.MAXCNT <= 1, which the code below hits.
I'm not sure how to best fix it.
Setting RXD.MAXCNT = 0 for 1 byte transactions fixes the issue but you also do not read a byte then, and some chips do send their status byte in every transaction during the first byte being sent - this would break this kind of status byte reading.
Code:
let mut buf = [Opcode::WriteEnable as u8];
spi.transfer(&mut cs, &mut buf).ok();
Hi,
When doing the following one hits errata 58 in https://infocenter.nordicsemi.com/pdf/nRF52832_Rev_3_Errata_v1.1.pdf which causes the chip to clock out 2 bytes instead of only one. Plus the CS line goes high while clocking causing weird things to happen on the bus.
The issues happen when
RXD.MAXCNT = 1
andTXD.MAXCNT <= 1
, which the code below hits. I'm not sure how to best fix it. SettingRXD.MAXCNT = 0
for 1 byte transactions fixes the issue but you also do not read a byte then, and some chips do send their status byte in every transaction during the first byte being sent - this would break this kind of status byte reading.Code:
Trace: