Can spi MOSI pin be idle low ?

When SPI enabled.

The MOSI pin seems to be idle high,
even I send a 0x00 through MOSI, it returns to HIGH.

is there anyway to make it low?

Change your SPI mode.

Hi MorganS,

Thanks, but I am referring the MOSI pin, not the CLK pin.

When SPI peripheral takes over the MOSI pin,
it seems it let it park at High level which I want it to be low.

It seems to be part of the SPI protocol for MOSI, MISO and SS (or CS) to be normally high. Why do you need idle low?

You should not even be looking at MOSI anyway if your slave Select is not active.

SCK High or Low can be determined by the SPI Mode you are running:

Has this question been answered - the only option I see is to add an external gate or FET to invert MOSI to allow idle low. This seems to be a limitation of AVR only as ARM based arduino allow MOSI to idle low.

The reason to do this is that some synchronous serial peripherals require MOSI low before /CS otherwise they ignore sent data.


There is a known issue with the MISO line with some SPI devices, but MOSI should not be an issue:

However, due to the full-duplex nature of the SPI driver, for every byte sent on the MOSI line, a byte is received on the MISO line. So if you send 5 bytes and want to read one byte, in response, you need to read 5 bytes and consider the 5th byte as the real "response" from the slave.

Thanks for your reply. It looks like I will have to add an external gate to hold MOSI low until SS is asserted. Here is the peripheral datasheet (NCV7719) - I am using 5 devices in a daisy chain.

Seems that some SPI interfaces behave strangely.

Instead of adding hardware, you can reconfigure the MOSI line in GPIO output and set it to low via software. Once done, the MOSI line can be reconfigured as a peripheral line handled by the SPI peripheral ?.

Interesting idea. I tried driving the line high as an output before sending words, but as soon as SPI is configured (SPE in SPCR) it controls the line and overrides the GPIO function.

I also tried sending 0x00 before my data to force MOSI low, but it defaults back to high when /SS deasserts.

As you suggest- I'll see if I can configure MOSI as a GPIO output and output low before engaging SPI mode and see if that will allow it to idle low (maybe the pull-ups are still enabled).