Deinitialize SPI

Hi,

i am creating a BLE application based on a NRF52832 with a coustum board.

I have a very small battery and thus need to save power in the best way possible. I already made made sure that I can shut down all my peripherals by GPIOs.

But the problem I have is that the SPI keeps the level of the MOSI line and the CS on a high level.

This leads to the problem that the peripherals are backsourced.

Because of that the peripherals are in an undefined state and therefore the current consumtion is very high during sleepmode (about 2mA).

My question is:

Is there a way to deinit the SPI interface via software to keep it from backsoucing my circuit?

My workaround at the moment is to set the CS pin low like a GPIO and disable the register of the SPI.

The problem with that is, that I need to reset the MCU to reenable the SPI.

Through this I can get into a state where the current consumption drops to 16uA but this is not suitable for a sleepmode that is called constantly in my application.

Related