Weird SPI read behaviour

Meanwhile I have tested manually setting the MOSI to 1 during the read operation. This works perfectly. Over the night it performed 25.000 file open, write, close operations without any error.

It should also work with a pullup resistor on the MOSI the blocking read call. But I havent tested that up to now.

I’m believe that the SPI fullduplex operation has a bug on the Apollo3 with SDK 2.5.1. It appears to be the case that the data in the read FIFO is somehow corrupted when using the blocking fullduplex mode.

Maybe the issue ERR018 in Apollo2 has never been really fixed and appears also in the Apollo3? … Errata.pdf

The question is how MBed OS and the Arduino Core can work with this faulty behaviour.

I havent tried to power cycle the IOM because I didn’t know that this is possible. It would have been a good idea to do that.