This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI current draw high after errata 89

Hi,

I'm using NRF52832 and a core adaptation for Arduino IDE. In my project I'm using both TWI and SPI interfaces. If for TWI I manage to reduce the current during sleep from 600 uA to 50 uA (normal for me since I have 2 peripherals running), when I add SPI - initialise SPI - and end it before going to sleep, current remains high - 500 uA- with errata correction. I've tried different workarounds - stop SPI 0,1,2. Add this:

*(volatile uint32_t *)0x40003000 = 0;
*(volatile uint32_t *)0x40003000;
*(volatile uint32_t *)0x40003000 = 1;

*(volatile uint32_t *)0x40004000 = 0;
*(volatile uint32_t *)0x40004000;
*(volatile uint32_t *)0x40004000 = 1;

*(volatile uint32_t *)0x40023000 = 0;
*(volatile uint32_t *)0x40023000;
*(volatile uint32_t *)0x40023000 = 1;

Still, the current remains the same. I've read that you need to reinitialise SPI after errata correction, I've added SPI.begin() and nothing. I've added #define SPI_INSTANCE  2 in my variant (I don't know if it's ok there) and nothing.

One observation is that my SPI peripheral is turned off by turning off its current source - a DCDC convertor from my PCB. I've tried different approaches like turning HIGH all SPI pins after that, and nothing.

Does anybody have another idea?

Parents Reply Children
No Data
Related