Xmega Application Note


System Clock internals
[System Clock Management]

Collaboration diagram for System Clock internals:

Functions

void sysclk_disable_pbb_module (unsigned int index)
 Disable a module clock derived from the PBB clock.
void sysclk_priv_disable_module (unsigned int bus_id, unsigned int module_index)
 Disable a maskable module clock.
void sysclk_priv_enable_module (unsigned int bus_id, unsigned int module_index)
 Enable a maskable module clock.

Detailed Description

For internal use only.

System clock management is fairly straightforward apart from one thing: Enabling and disabling bus bridges. When all peripherals on a given bus are disabled, the bridge to the bus may be disabled. Only the PBA and PBB busses support this, and it is not practical to disable the PBA bridge as it includes the Power Manager, so turning it off would make it impossible to turn anything back on again.

The system clock implementation keeps track of a reference count for PBB. When the reference count is zero, the bus bridge is disabled, otherwise it is enabled.


Function Documentation

void sysclk_disable_pbb_module ( unsigned int  index  ) 

Disable a module clock derived from the PBB clock.

Parameters:
index Index of the module clock in the PBBMASK register

Definition at line 98 of file sysclk.c.

00099 {
00100 }

void sysclk_priv_disable_module ( unsigned int  bus_id,
unsigned int  module_index 
)

Disable a maskable module clock.

For internal use only.

Parameters:
bus_id Bus index starting at 0 and following the same order as the xxxMASK registers.
module_index Index of the module to be disabled. This is the bit number in the corresponding xxxMASK register.

Definition at line 89 of file sysclk.c.

Referenced by sysclk_disable_cpu_module(), sysclk_disable_hsb_module(), and sysclk_disable_pba_module().

00090 {
00091 }

void sysclk_priv_enable_module ( unsigned int  bus_id,
unsigned int  module_index 
)

Enable a maskable module clock.

For internal use only.

Parameters:
bus_id Bus index starting at 0 and following the same order as the xxxMASK registers.
module_index Index of the module to be enabled. This is the bit number in the corresponding xxxMASK register.

Definition at line 76 of file sysclk.c.

Referenced by sysclk_enable_cpu_module(), sysclk_enable_hsb_module(), and sysclk_enable_pba_module().

00077 {
00078   // Ahem... no, thanks.
00079 }

@DOC_TITLE@
Generated on Fri Oct 22 12:15:26 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3