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
+3
View File
@@ -204,6 +204,9 @@ bool SpiMaster::Write(uint8_t pinCsn, const uint8_t* data, size_t size) {
;
nrf_gpio_pin_set(this->pinCsn);
currentBufferAddr = 0;
DisableWorkaroundForFtpan58(spiBaseAddress, 0, 0);
xSemaphoreGive(mutex);
}