Power Management Controler Peripheral

PMC (AT91S_PMC) 0xFFFFFC00 (AT91C_BASE_PMC)
Periph ID AIC Symbol Description
1 (AT91C_ID_SYS)System Peripheral

Signal Symbol PIO controller Description
PCK1(AT91C_PA17_PCK1 )PIOA Periph: B Bit: 17PMC Programmable Clock Output 1
PCK1(AT91C_PA21_PCK1 )PIOA Periph: B Bit: 21PMC Programmable Clock Output 1
PCK2(AT91C_PA31_PCK2 )PIOA Periph: B Bit: 31PMC Programmable Clock Output 2
PCK2(AT91C_PA18_PCK2 )PIOA Periph: B Bit: 18PMC Programmable Clock Output 2
PCK0(AT91C_PA6_PCK0 )PIOA Periph: B Bit: 6PMC Programmable Clock Output 0

Function Description
AT91F_PMC_CfgPMCEnable Peripheral clock in PMC for PMC
AT91F_PMC_CfgPIOConfigure PIO controllers to drive PMC signals


PMC Software API (AT91S_PMC)

Offset Field Description
0x0PMC_SCERSystem Clock Enable Register
0x4PMC_SCDRSystem Clock Disable Register
0x8PMC_SCSRSystem Clock Status Register
0x10PMC_PCERPeripheral Clock Enable Register
0x14PMC_PCDRPeripheral Clock Disable Register
0x18PMC_PCSRPeripheral Clock Status Register
0x20PMC_MOR (CKGR_MOR)Main Oscillator Register
0x24PMC_MCFR (CKGR_MCFR)Main Clock Frequency Register
0x2CPMC_PLLR (CKGR_PLLR)PLL Register
0x30PMC_MCKRMaster Clock Register
0x40PMC_PCKR[8] (PMC_PCKR)Programmable Clock Register
0x60PMC_IERInterrupt Enable Register
0x64PMC_IDRInterrupt Disable Register
0x68PMC_SRStatus Register
0x6CPMC_IMRInterrupt Mask Register

Function Description
AT91F_PMC_GetInterruptMaskStatusReturn PMC Interrupt Mask Status
AT91F_CKGR_DisableMainOscillatorDisable the main oscillator
AT91F_CKGR_GetMainOscillatorRegCfg the main oscillator
AT91F_PMC_CfgSysClkEnableRegConfigure the System Clock Enable Register of the PMC controller
AT91F_PMC_EnablePeriphClockEnable peripheral clock
AT91F_CKGR_GetMainClockReturn Main clock in Hz
AT91F_PMC_CfgSysClkDisableRegConfigure the System Clock Disable Register of the PMC controller
AT91F_PMC_DisablePeriphClockDisable peripheral clock
AT91F_PMC_IsInterruptMaskedTest if PMC Interrupt is Masked
AT91F_PMC_EnableItEnable PMC interrupt
AT91F_PMC_DisablePCKEnable peripheral clock
AT91F_PMC_GetSysClkStatusRegReturn the System Clock Status Register of the PMC controller
AT91F_PMC_GetPeriphClockGet peripheral clock status
AT91F_PMC_EnablePCKEnable peripheral clock
AT91F_CKGR_EnableMainOscillatorEnable the main oscillator
AT91F_CKGR_GetMainClockFreqRegCfg the main oscillator
AT91F_PMC_GetMCKRegReturn Master Clock Register
AT91F_PMC_GetMasterClockReturn master clock in Hz which correponds to processor clock for ARM7
AT91F_PMC_IsStatusSetTest if PMC Status is Set
AT91F_PMC_DisableItDisable PMC interrupt
AT91F_CKGR_CfgMainOscStartUpTimeCfg MOR Register according to the main osc startup time
AT91F_PMC_GetStatusReturn PMC Interrupt Status
AT91F_CKGR_CfgMainOscillatorRegCfg the main oscillator
AT91F_PMC_CfgMCKRegCfg Master Clock Register

PMC Register Description

PMC: AT91_REG PMC_SCER - System Clock Enable Register

Offset Name Description
0PMC_PCK
AT91C_PMC_PCK
Processor Clock
0 = The processor clock is disabled
1 = The processor clock is enabled
7PMC_UDP
AT91C_PMC_UDP
USB Device Port Clock
0 = The 48 MHz clock of the USB Device Port is disabled
1 = The 48 MHz clock of the USB Device Port is enabled
8PMC_PCK0
AT91C_PMC_PCK0
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
9PMC_PCK1
AT91C_PMC_PCK1
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
10PMC_PCK2
AT91C_PMC_PCK2
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
11PMC_PCK3
AT91C_PMC_PCK3
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.

PMC: AT91_REG PMC_SCDR - System Clock Disable Register

Offset Name Description
0PMC_PCK
AT91C_PMC_PCK
Processor Clock
0 = The processor clock is disabled
1 = The processor clock is enabled
7PMC_UDP
AT91C_PMC_UDP
USB Device Port Clock
0 = The 48 MHz clock of the USB Device Port is disabled
1 = The 48 MHz clock of the USB Device Port is enabled
8PMC_PCK0
AT91C_PMC_PCK0
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
9PMC_PCK1
AT91C_PMC_PCK1
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
10PMC_PCK2
AT91C_PMC_PCK2
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
11PMC_PCK3
AT91C_PMC_PCK3
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.

PMC: AT91_REG PMC_SCSR - System Clock Status Register

Offset Name Description
0PMC_PCK
AT91C_PMC_PCK
Processor Clock
0 = The processor clock is disabled
1 = The processor clock is enabled
7PMC_UDP
AT91C_PMC_UDP
USB Device Port Clock
0 = The 48 MHz clock of the USB Device Port is disabled
1 = The 48 MHz clock of the USB Device Port is enabled
8PMC_PCK0
AT91C_PMC_PCK0
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
9PMC_PCK1
AT91C_PMC_PCK1
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
10PMC_PCK2
AT91C_PMC_PCK2
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.
11PMC_PCK3
AT91C_PMC_PCK3
Programmable Clock Output
0 = The corresponding programmable clock output is disabled.
1 = The corresponding programmable clock output is enabled.

PMC: AT91_REG PMC_PCER - Peripheral Clock Enable Register


PID2...PID31: Peripheral Identifier 2 to 31
0 = No effect.
1 = Enables the peripheral clock.

PMC: AT91_REG PMC_PCDR - Peripheral Clock Disable Register


PID2...PID31: Peripheral Identifier 2 to 31
0 = No effect.
1 = Disables the peripheral clock.

PMC: AT91_REG PMC_PCSR - Peripheral Clock Status Register


PID2...PID31: Peripheral Identifier 2 to 31
0 = peripheral clock disabled.
1 = peripheral clock enabled.

PMC: AT91_REG CKGR_MOR - Main Oscillator Register

Offset Name Description
0CKGR_MOSCEN
AT91C_CKGR_MOSCEN
Main Oscillator Enable
0 = The main oscillator is disabled.
1 = The main oscillator is enabled.
1CKGR_OSCBYPASS
AT91C_CKGR_OSCBYPASS
Main Oscillator Bypass
0 = The main oscillator is not bypassed.
1 = The main oscillator is bypassed. MOSCEN bit must be set to 0.
15..8CKGR_OSCOUNT
AT91C_CKGR_OSCOUNT
Main Oscillator Start-up Time
Specifies the number of slow clock cycles multiplied by 8 for the main oscillator start-up time.

PMC: AT91_REG CKGR_MCFR - Main Clock Frequency Register

Offset Name Description
15..0CKGR_MAINF
AT91C_CKGR_MAINF
Main Clock Frequency
Gives the number of main clock cycles within 16 slow clock periods.
16CKGR_MAINRDY
AT91C_CKGR_MAINRDY
Main Clock Ready
0 = FMAIN value is not valid or the main oscillator is disabled.
1 = The main oscillator has been enabled previously and MAINF value is available.

PMC: AT91_REG CKGR_PLLR - PLL Register

Offset Name Description
7..0CKGR_DIV
AT91C_CKGR_DIV
Divider Selected
2-255 Divider output is the selected clock divided by DIV
ValueLabelDescription
0CKGR_DIV_0
AT91C_CKGR_DIV_0

Divider output is 0
1CKGR_DIV_BYPASS
AT91C_CKGR_DIV_BYPASS

Divider is bypassed
13..8CKGR_PLLCOUNT
AT91C_CKGR_PLLCOUNT
PLL Counter
Specifies the number of slow clock cycles before the LOCK bit is set in APMC_SR after APMC_PLL is written.
15..14CKGR_OUT
AT91C_CKGR_OUT
PLL Output Frequency Range
ValueLabelDescription
0CKGR_OUT_0
AT91C_CKGR_OUT_0

Please refer to the PLL datasheet
1CKGR_OUT_1
AT91C_CKGR_OUT_1

Please refer to the PLL datasheet
2CKGR_OUT_2
AT91C_CKGR_OUT_2

Please refer to the PLL datasheet
3CKGR_OUT_3
AT91C_CKGR_OUT_3

Please refer to the PLL datasheet
26..16CKGR_MUL
AT91C_CKGR_MUL
PLL Multiplier
0 = The PLL is deactivated.
1 up to 2047 = The PLL output frequency is the PLL input frequency multiplied by MUL + 1.
29..28CKGR_USBDIV
AT91C_CKGR_USBDIV
Divider for USB Clocks
ValueLabelDescription
0CKGR_USBDIV_0
AT91C_CKGR_USBDIV_0

Divider output is PLL clock output
1CKGR_USBDIV_1
AT91C_CKGR_USBDIV_1

Divider output is PLL clock output divided by 2
2CKGR_USBDIV_2
AT91C_CKGR_USBDIV_2

Divider output is PLL clock output divided by 4

PMC: AT91_REG PMC_MCKR - Master Clock Register

Offset Name Description
1..0PMC_CSS
AT91C_PMC_CSS
Programmable Clock Selection
Clock selection
ValueLabelDescription
0PMC_CSS_SLOW_CLK
AT91C_PMC_CSS_SLOW_CLK

Slow Clock is selected
1PMC_CSS_MAIN_CLK
AT91C_PMC_CSS_MAIN_CLK

Main Clock is selected
3PMC_CSS_PLL_CLK
AT91C_PMC_CSS_PLL_CLK

Clock from PLL is selected
4..2PMC_PRES
AT91C_PMC_PRES
Programmable Clock Prescaler
Master clock
ValueLabelDescription
0PMC_PRES_CLK
AT91C_PMC_PRES_CLK

Selected clock
1PMC_PRES_CLK_2
AT91C_PMC_PRES_CLK_2

Selected clock divided by 2
2PMC_PRES_CLK_4
AT91C_PMC_PRES_CLK_4

Selected clock divided by 4
3PMC_PRES_CLK_8
AT91C_PMC_PRES_CLK_8

Selected clock divided by 8
4PMC_PRES_CLK_16
AT91C_PMC_PRES_CLK_16

Selected clock divided by 16
5PMC_PRES_CLK_32
AT91C_PMC_PRES_CLK_32

Selected clock divided by 32
6PMC_PRES_CLK_64
AT91C_PMC_PRES_CLK_64

Selected clock divided by 64

PMC: AT91_REG PMC_PCKR - Programmable Clock Register

Offset Name Description
1..0PMC_CSS
AT91C_PMC_CSS
Programmable Clock Selection
Clock selection
ValueLabelDescription
0PMC_CSS_SLOW_CLK
AT91C_PMC_CSS_SLOW_CLK

Slow Clock is selected
1PMC_CSS_MAIN_CLK
AT91C_PMC_CSS_MAIN_CLK

Main Clock is selected
3PMC_CSS_PLL_CLK
AT91C_PMC_CSS_PLL_CLK

Clock from PLL is selected
4..2PMC_PRES
AT91C_PMC_PRES
Programmable Clock Prescaler
Master clock
ValueLabelDescription
0PMC_PRES_CLK
AT91C_PMC_PRES_CLK

Selected clock
1PMC_PRES_CLK_2
AT91C_PMC_PRES_CLK_2

Selected clock divided by 2
2PMC_PRES_CLK_4
AT91C_PMC_PRES_CLK_4

Selected clock divided by 4
3PMC_PRES_CLK_8
AT91C_PMC_PRES_CLK_8

Selected clock divided by 8
4PMC_PRES_CLK_16
AT91C_PMC_PRES_CLK_16

Selected clock divided by 16
5PMC_PRES_CLK_32
AT91C_PMC_PRES_CLK_32

Selected clock divided by 32
6PMC_PRES_CLK_64
AT91C_PMC_PRES_CLK_64

Selected clock divided by 64

PMC: AT91_REG PMC_IER - Interrupt Enable Register

Offset Name Description
0PMC_MOSCS
AT91C_PMC_MOSCS
MOSC Status/Enable/Disable/Mask
0 = Main oscillator is not stabilized.
1 = Main oscillator is stabilized.
2PMC_LOCK
AT91C_PMC_LOCK
PLL Status/Enable/Disable/Mask
0 = PLL is not locked.
1 = PLL is locked.
3PMC_MCKRDY
AT91C_PMC_MCKRDY
MCK_RDY Status/Enable/Disable/Mask
0 = MCK Clock is not ready to be turned on.
1 = MCK Clock is ready to be turned on.
8PMC_PCK0RDY
AT91C_PMC_PCK0RDY
PCK0_RDY Status/Enable/Disable/Mask
0 = Pad Clock0 is not ready to be turned on.
1 = Pad Clock0 is ready to be turned on.
9PMC_PCK1RDY
AT91C_PMC_PCK1RDY
PCK1_RDY Status/Enable/Disable/Mask
0 = Pad Clock1 is not ready to be turned on.
1 = Pad Clock1 is ready to be turned on.
10PMC_PCK2RDY
AT91C_PMC_PCK2RDY
PCK2_RDY Status/Enable/Disable/Mask
0 = Pad Clock2 is not ready to be turned on.
1 = Pad Clock2 is ready to be turned on.
11PMC_PCK3RDY
AT91C_PMC_PCK3RDY
PCK3_RDY Status/Enable/Disable/Mask
0 = Pad Clock3 is not ready to be turned on.
1 = Pad Clock3 is ready to be turned on.

PMC: AT91_REG PMC_IDR - Interrupt Disable Register

Offset Name Description
0PMC_MOSCS
AT91C_PMC_MOSCS
MOSC Status/Enable/Disable/Mask
0 = Main oscillator is not stabilized.
1 = Main oscillator is stabilized.
2PMC_LOCK
AT91C_PMC_LOCK
PLL Status/Enable/Disable/Mask
0 = PLL is not locked.
1 = PLL is locked.
3PMC_MCKRDY
AT91C_PMC_MCKRDY
MCK_RDY Status/Enable/Disable/Mask
0 = MCK Clock is not ready to be turned on.
1 = MCK Clock is ready to be turned on.
8PMC_PCK0RDY
AT91C_PMC_PCK0RDY
PCK0_RDY Status/Enable/Disable/Mask
0 = Pad Clock0 is not ready to be turned on.
1 = Pad Clock0 is ready to be turned on.
9PMC_PCK1RDY
AT91C_PMC_PCK1RDY
PCK1_RDY Status/Enable/Disable/Mask
0 = Pad Clock1 is not ready to be turned on.
1 = Pad Clock1 is ready to be turned on.
10PMC_PCK2RDY
AT91C_PMC_PCK2RDY
PCK2_RDY Status/Enable/Disable/Mask
0 = Pad Clock2 is not ready to be turned on.
1 = Pad Clock2 is ready to be turned on.
11PMC_PCK3RDY
AT91C_PMC_PCK3RDY
PCK3_RDY Status/Enable/Disable/Mask
0 = Pad Clock3 is not ready to be turned on.
1 = Pad Clock3 is ready to be turned on.

PMC: AT91_REG PMC_SR - Status Register

Offset Name Description
0PMC_MOSCS
AT91C_PMC_MOSCS
MOSC Status/Enable/Disable/Mask
0 = Main oscillator is not stabilized.
1 = Main oscillator is stabilized.
2PMC_LOCK
AT91C_PMC_LOCK
PLL Status/Enable/Disable/Mask
0 = PLL is not locked.
1 = PLL is locked.
3PMC_MCKRDY
AT91C_PMC_MCKRDY
MCK_RDY Status/Enable/Disable/Mask
0 = MCK Clock is not ready to be turned on.
1 = MCK Clock is ready to be turned on.
8PMC_PCK0RDY
AT91C_PMC_PCK0RDY
PCK0_RDY Status/Enable/Disable/Mask
0 = Pad Clock0 is not ready to be turned on.
1 = Pad Clock0 is ready to be turned on.
9PMC_PCK1RDY
AT91C_PMC_PCK1RDY
PCK1_RDY Status/Enable/Disable/Mask
0 = Pad Clock1 is not ready to be turned on.
1 = Pad Clock1 is ready to be turned on.
10PMC_PCK2RDY
AT91C_PMC_PCK2RDY
PCK2_RDY Status/Enable/Disable/Mask
0 = Pad Clock2 is not ready to be turned on.
1 = Pad Clock2 is ready to be turned on.
11PMC_PCK3RDY
AT91C_PMC_PCK3RDY
PCK3_RDY Status/Enable/Disable/Mask
0 = Pad Clock3 is not ready to be turned on.
1 = Pad Clock3 is ready to be turned on.

PMC: AT91_REG PMC_IMR - Interrupt Mask Register

Offset Name Description
0PMC_MOSCS
AT91C_PMC_MOSCS
MOSC Status/Enable/Disable/Mask
0 = Main oscillator is not stabilized.
1 = Main oscillator is stabilized.
2PMC_LOCK
AT91C_PMC_LOCK
PLL Status/Enable/Disable/Mask
0 = PLL is not locked.
1 = PLL is locked.
3PMC_MCKRDY
AT91C_PMC_MCKRDY
MCK_RDY Status/Enable/Disable/Mask
0 = MCK Clock is not ready to be turned on.
1 = MCK Clock is ready to be turned on.
8PMC_PCK0RDY
AT91C_PMC_PCK0RDY
PCK0_RDY Status/Enable/Disable/Mask
0 = Pad Clock0 is not ready to be turned on.
1 = Pad Clock0 is ready to be turned on.
9PMC_PCK1RDY
AT91C_PMC_PCK1RDY
PCK1_RDY Status/Enable/Disable/Mask
0 = Pad Clock1 is not ready to be turned on.
1 = Pad Clock1 is ready to be turned on.
10PMC_PCK2RDY
AT91C_PMC_PCK2RDY
PCK2_RDY Status/Enable/Disable/Mask
0 = Pad Clock2 is not ready to be turned on.
1 = Pad Clock2 is ready to be turned on.
11PMC_PCK3RDY
AT91C_PMC_PCK3RDY
PCK3_RDY Status/Enable/Disable/Mask
0 = Pad Clock3 is not ready to be turned on.
1 = Pad Clock3 is ready to be turned on.