The SPI MOSI pin defaults to high. So when no data is being sent, it goes high. I would like it to be low.
So I had a look at the Port Integration section of the Reference Manual, and it seemed this should be possible. The settings would be: wire-or mode, pull enabled, pulldown i.e. for MOSI on port 0:
WOMS &= ~0b00100000; // set PS5 to wire-or mode
PERS |= 0b00100000; // enable pull resistor on PS5
PPSS |= 0b0010000; // pull down
I'm afraid this doesn't work. I assume that is because these configuration bits do not apply when using the pins as SPI.
Or have I made an error?
Any other way to make the default state of MOSI low?