15.6.2.6 Peripheral Clock Masking
The user can disable or enable the AHB or APB clock for a peripheral by writing the corresponding bit in the Clock Mask registers (APBxMASK) to '0' or '1'. The default state of the peripheral clocks is given in the table below:
CPU Clock Domain | |
---|---|
Peripheral Clock | Default State |
CLK_AC_APB | Disabled |
CLK_ADC0_APB | Disabled |
CLK_ADC1_APB | Disabled |
CLK_AES_APB | Disabled |
CLK_BRIDGE_A_AHB | Enabled |
CLK_BRIDGE_B_AHB | Enabled |
CLK_BRIDGE_C_AHB | Enabled |
CLK_BRIDGE_D_AHB | Enabled |
CLK_CAN0_AHB | Enabled |
CLK_CAN1_AHB | Enabled |
CLK_CMCC_AHB | Enabled |
CLK_DMAC_AHB | Enabled |
CLK_DSU_AHB | Enabled |
CLK_EIC_APB | Enabled |
CLK_EVSYS_APB | Disabled |
CLK_FREQM_APB | Disabled |
CLK_GCLK_APB | Enabled |
CLK_GMAC_AHB | Enabled |
CLK_GMAC_APB | Disabled |
CLK_ICM_AHB | Enabled |
CLK_I2S_AHB | Disabled |
CLK_MCLK_APB | Enabled |
CLK_NVMCTRL_AHB | Enabled |
CLK_NVMCTRL_APB | Enabled |
CLK_NVMCTRL_CACHE | Enabled |
CLK_NVMCTRL_SMEEPROM | Enabled |
CLK_OSCCTRL_APB | Enabled |
CLK_PAC_AHB | Enabled |
CLK_PAC_APB | Enabled |
CLK_PDEC_APB | Disabled |
CLK_PORT_APB | Enabled |
CLK_PUKCC_AHB | Enabled |
CLK_QSPI_AHB | Enabled |
CLK_QSPI2X_AHB | Enabled |
CLK_SDHC0_AHB | Enabled |
CLK_SDHC1_AHB | Enabled |
CLK_SERCOM0_APB | Disabled |
CLK_SERCOM1_APB | Disabled |
CLK_SERCOM2_APB | Disabled |
CLK_SERCOM3_APB | Disabled |
CLK_SERCOM4_APB | Disabled |
CLK_SERCOM5_APB | Disabled |
CLK_SERCOM6_APB | Disabled |
CLK_SERCOM7_APB | Disabled |
CLK_TC0_APB | Disabled |
CLK_TC1_APB | Disabled |
CLK_TC2_APB | Disabled |
CLK_TC3_APB | Disabled |
CLK_TC4_APB | Disabled |
CLK_TC5_APB | Disabled |
CLK_TC6_APB | Disabled |
CLK_TC7_APB | Disabled |
CLK_TCC0_APB | Disabled |
CLK_TCC1_APB | Disabled |
CLK_TCC2_APB | Disabled |
CLK_TCC3_APB | Disabled |
CLK_TCC4_APB | Disabled |
CLK_USB_AHB | Enabled |
CLK_USB_APB | Disabled |
CLK_WDT_APB | Enabled |
CLK_DAC_APB | Disabled |
CLK_DSU_APB | Enabled |
CLK_CCL_APB | Disabled |
CLK_QSPI_APB | Enabled |
CLK_ICM_APB | Disabled |
CLK_TRNG_APB | Disabled |
Backup Clock Domain | |
Peripheral Clock | Default State |
CLK_OSC32KCTRL_APB | Enabled |
CLK_PM_APB | Enabled |
CLK_SUPC_APB | Enabled |
CLK_RSTC_APB | Enabled |
CLK_RTC_APB | Enabled |
When the APB clock is not provided to a module, its registers cannot be read or written. The module can be re-enabled later by writing the corresponding mask bit to '1'.
A module may be connected to several clock domains (for example, AHB and APB), in which case it will have several mask bits.
The clocks should only be switched off if it is certain that the module will not be used: Switching off the clock for the NVM Controller (NVMCTRL) will cause a problem if the CPU needs to read from the Flash memory. Switching off the clock to the MCLK module (which contains the mask registers) or the corresponding APBx bridge, will make it impossible to write the mask registers again. In this case, they can only be re-enabled by a system reset.