XDK API  3.6.0
Documentation
Files | Functions
MCU Sleep API

Micro-Controller Sleep API. More...

+ Collaboration diagram for MCU Sleep API:

Files

file  BCDS_MCU_Sleep.h
 

Functions

Retcode_T MCU_Sleep_BlockSleepMode (uint32_t mode)
 Block Sleep Mode. More...
 
void MCU_Sleep_EnterSleep (uint32_t mode)
 MCU Sleep. More...
 
uint32_t MCU_Sleep_GetLowestSleepMode (void)
 Get Lowest Sleep Mode. More...
 
Retcode_T MCU_Sleep_Initialize (void)
 Initialize MCU Sleep Management. More...
 
Retcode_T MCU_Sleep_UnblockSleepMode (uint32_t mode)
 Unblock a sleep mode. More...
 

Detailed Description

This is the interface to common MCU sleep management functionality

The invoking application shall be able to block the system from entering into certain energy modes.

Sleep modes can be blocked or unblocked by a nested counting semaphore. A block operation increases the counter by one element, unblocking will decrease this.

The MCU_Sleep_GoSleep will go into the lowest/deepest acceptable sleep mode.

Pre-sleep and post-sleep callbacks can be registered in order to do the last preparations from the application/BSP perspective before and after sleeping

Such callbacks might include pin-settings configuration, turning interrupts on/off, etc.

Warning
Only power-saving modes which retain CPU and RAM are considered here as a sleep mode. This excludes some shutdown-modes!

Function Documentation

Retcode_T MCU_Sleep_BlockSleepMode ( uint32_t  mode)

Blocks the sleep management from entering into the specified sleep mode

Parameters
[in]mode: Mode to block
Return values
RETCODE_OK: Successful Execution
RETCODE_INVALID_PARAM: Tried to block an unsupported mode
void MCU_Sleep_EnterSleep ( uint32_t  mode)

Enters the micro-controller into the lowest possible sleep mode. This function returns after the MCU is awake again.

Parameters
[in]mode: Sleep mode to be entered

+ Here is the caller graph for this function:

uint32_t MCU_Sleep_GetLowestSleepMode ( void  )

Returns the lowest possible sleep mode to use. Mind that only power-saving modes which retain CPU and RAM are considered here as sleep modes.

Returns
Lowest Sleep Mode Available
Retcode_T MCU_Sleep_Initialize ( void  )

This function initializes the micro-controller sleep management

Return values
RETCODE_OK: Successful Execution
Retcode_T MCU_Sleep_UnblockSleepMode ( uint32_t  mode)

Removes one blockade in the sleep management from entering into the specified sleep mode

Parameters
[in]mode: Mode to unblock
Return values
RETCODE_OK: Successful Execution
RETCODE_INVALID_PARAM: Tried to unblock an unsupported mode

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:53 by doxygen 1.8.8