Power optimization - Improve SPI sleep mode

Ensure that all pins are set to their default configuration during sleep mode.
Disable the workaround for FTPAN58 (SPI freezes when transfering a single byte) at the end of the transfer. This disables the resources needed for the workaround.
Those changes reduce the power usage by 430-490µA.
This commit is contained in:
Jean-François Milants
2023-05-07 18:24:34 +02:00
committed by JF
parent 2fa3aaa161
commit 4c0f897953
4 changed files with 11 additions and 1 deletions

View File

@@ -27,7 +27,8 @@ bool Spi::WriteCmdAndBuffer(const uint8_t* cmd, size_t cmdSize, const uint8_t* d
}
bool Spi::Init() {
nrf_gpio_pin_set(pinCsn); /* disable Set slave select (inactive high) */
nrf_gpio_cfg_output(pinCsn);
nrf_gpio_pin_set(pinCsn);
return true;
}