Contiki-NG
Files | Data Structures | Typedefs | Functions
CC13xx/CC26xx AUX domain controller

CC13xx/CC26xx AUX domain power management controller. More...

Files

file  aux-ctrl.h
 Header file for the management of the CC13xx/CC26xx AUX domain.
 

Data Structures

struct  aux_consumer_module
 The data structure to be used for modules that require access to AUX. More...
 

Typedefs

typedef struct aux_consumer_module aux_consumer_module_t
 The data structure to be used for modules that require access to AUX. More...
 

Functions

void aux_ctrl_register_consumer (aux_consumer_module_t *consumer)
 Register a module that no longer requires access to the AUX power domain. More...
 
void aux_ctrl_unregister_consumer (aux_consumer_module_t *consumer)
 Deregister a module that no longer requires access to the AUX power domain. More...
 
void aux_ctrl_power_up (void)
 Power-up the AUX power domain. More...
 
void aux_ctrl_power_down (bool force)
 Power down the AUX power domain. More...
 

Detailed Description

CC13xx/CC26xx AUX domain power management controller.

Typedef Documentation

◆ aux_consumer_module_t

The data structure to be used for modules that require access to AUX.

The clocks field should specify the clocks (within AUX) that your module requires in order to perform its functionality. Those clocks are an ORd value of AUX_WUC_xxxx_CLOCK. For instance, the oscillators module specifies AUX_WUC_OSCCTRL_CLOCK | AUX_WUC_SMPH_CLOCK

Function Documentation

◆ aux_ctrl_power_down()

void aux_ctrl_power_down ( bool  force)

Power down the AUX power domain.

Parameters
forceForce the power down irrespective of registered consumers

This function will shut down the AUX power-domain.

The shutdown is unconditional if force is true. If force is false and there are registered consumers, the power-down will be suppressed.

This function will automatically get called by the LPM module whenever the chip tries to enter deep sleep or shuts down.

User applications will normally not need to call this function. if you are developing a user application that no longer requires access, to AUX, you should normally simply release it by calling aux_ctrl_unregister_consumer(). If no other consumers are using AUX, then the lpm module will shut it down.

Definition at line 87 of file aux-ctrl.c.

References list_head().

◆ aux_ctrl_power_up()

void aux_ctrl_power_up ( void  )

Power-up the AUX power domain.

This function will power up the AUX power-domain, but only if there are registered consumers for it. If there are not, the PD will stay off.

This function will automatically get called by the LPM module whenever the chip comes out of deep sleep.

User applications will normally not need to call this function. if you are developing a user application that requires access, to AUX, you should normally call aux_ctrl_register_consumer(), which will automatically power up AUX for you, if it's not already powered.

Definition at line 75 of file aux-ctrl.c.

References list_head().

◆ aux_ctrl_register_consumer()

void aux_ctrl_register_consumer ( aux_consumer_module_t consumer)

Register a module that no longer requires access to the AUX power domain.

Parameters
consumerA pointer to the data structure of your AUX consumer

Call this function if you are developing a module that requires access to hardware within the AUX PD. Calling this function will achieve a number of things:

  • It will power up the AUX PD
  • It will enable the AUX clocks that you require

If you call this function, AUX will stay powered-on and clocked during deep sleep, and retention will be enabled (so that you can e.g. use the sensor controller to monitor peripherals while the main MCU in deep sleep). If you do not need AUX enabled during deep sleep, you must release it by calling aux_ctrl_unregister_consumer()

See also
aux_ctrl_unregister_consumer

Definition at line 44 of file aux-ctrl.c.

Referenced by oscillators_request_hf_xosc(), oscillators_select_lf_rcosc(), oscillators_select_lf_xosc(), oscillators_switch_to_hf_rc(), and oscillators_switch_to_hf_xosc().

◆ aux_ctrl_unregister_consumer()

void aux_ctrl_unregister_consumer ( aux_consumer_module_t consumer)

Deregister a module that no longer requires access to the AUX power domain.

Parameters
consumerA pointer to the data structure of your AUX consumer

When your module is finished using features provided from within the AUX domain, you should call this function to signal that AUX is no longer required, so that the LPM module can power it down in deep sleep. If there are no more registered consumers left, this function will also power down AUX.

See also
aux_ctrl_register_consumer
aux_ctrl_power_down

Definition at line 61 of file aux-ctrl.c.