user13327: I have an SPI slave connected to Due. I send the SPI slave into sleep mode. During sleep, I need to pull all pins low, including MOSI. What's the best way to pull the SPI-4 pin low on a Due?
Here's a similar question but it's about an AVR chip and the answer obviously doesn't apply to SAM3X8 which is an ARM.

user13327: I have managed to set MOSI to low by setting bit 26 in PIOA->PIO_PER, PIOA->PIO_OER and  PIOA->PIO_CODR registers. To use SPI again, bit 26 in PIOA->PIO_PDR has to be set (this cancels the effect of PIOA->PIO_PER).

13327: <p>I have an SPI slave connected to Due. I send the SPI slave into sleep mode. During sleep, I need to pull all pins low, including MOSI. What's the best way to pull the SPI-4 pin low on a Due?</p>

<p><a href="https://arduino.stackexchange.com/a/62492/13327">Here</a>'s a similar question but it's about an AVR chip and the answer obviously doesn't apply to SAM3X8 which is an ARM.</p>
 13327: <p>I have managed to set MOSI to low by setting bit 26 in <code>PIOA-&gt;PIO_PER</code>, <code>PIOA-&gt;PIO_OER</code> and  <code>PIOA-&gt;PIO_CODR</code> registers. To use SPI again, bit 26 in <code>PIOA-&gt;PIO_PDR</code> has to be set (this cancels the effect of <code>PIOA-&gt;PIO_PER</code>).</p>
