2

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.

Dmitry Grigoryev
  • 1,288
  • 11
  • 31

1 Answers1

1

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).

Dmitry Grigoryev
  • 1,288
  • 11
  • 31