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

Power management differences between SDK 15 and SDK 11

Hi There,

I have developed an initial application on SDK11, based on the UART example, with Keil and it worked perfectly with the nice low power that you guys are capable of.

Then I moved my application to the SDK15 and Segger, and I struggled a lot to get my power numbers back in line (sleep mode).

The problem was two points:

- In the SDK11, the PowerManage() function was able to stop my working peripheral (SPI) before entering sleep. In the SDK15, the idle_state_handle() function does not do that. I have to explicitly de-init the SPI.

- In the SDK11, the IOs where all at the default level (disconnected) at startup. In SDK15, I have to explicitly initialize all my IOs. Not sure if it is related to the SDK or to the startup files from Segger.

Do you confirm these two points?

Or do I do anything wrong?

Regards

Spontz

  • Hi Spontz

    1. Why would the SPI be initialized at all in the UART example? The idle state handle should do the same as the power_manage function after handling any pending operations. So I am guessing the extra current draw is for the application to finish up any pending operations before going to sleep.

    2. The pins not used in the SEGGER example, should all be disconnected, so yes, you will have to initialize the other IOs. Struggling a bit to understand what is the problem in this question.

    How high of a current draw are you experiencing compared to the SDK11 example? It shouldn't be too hard to achieve the same results if you are using the same kind of chip.

    Best regards,

    Simon

  • Hi Simon,

    I start with the UART example (BLE_peripheral /BLE UART) because I needed basic data communication on BLE. I use SPI to communicate with a MEMS sensor on my board.

    In the SDK11, I just called PowerManage() and it took care of putting the SPI peripheral into sleep.

    In the SDK15, the idle_state_handle() function does not do that. I have to explicitly call de-init the SPI before sleep, then call init again everytime I wake up. I wake up on a timer event every 50ms.

    I use the legacy SPI driver. (identical in SDK11 and 15)

    So my question is related to SDK15:

    - is what I do (de-init / re-init) the right way to manage a peripheral power when using sleep/wake ?

    - is there a higher level function that can desactivate all peripherals before entering sleep? It seems to exist in SDK11.

    Regards

    Spontz

  • Hi Spontz

    After some digging it seems you are right. You have to make your own loop for deinitializing and reinitializing your peripherals when using SDK15. I have not been able to find an equivalent function to the power_manage function in SDK11. 

    Best regards,

    Simon

Related