20.5.2.6 Peripheral Clock Masking
It is possible to disable/enable the AHB or APB clock for a peripheral by writing the corresponding bit in the Clock Mask registers MSKx to '0'/'1'. The default state of the peripheral clocks is shown here.
Clock | Clock Index | SFR Field | POR Default |
---|---|---|---|
CLK_AC_APB | 105 | CLKMSK3.MSK9 | Enabled |
CLK_ADC_APB | 104 | CLKMSK3.MSK8 | Enabled |
CLK_BSDAP_APB | 115 | CLKMSK3.MSK19 | Enabled |
CLK_CAN0_AHB | 13 | CLKMSK0.MSK13 | Enabled |
CLK_CAN1_AHB | 14 | CLKMSK0.MSK14 | Enabled |
CLK_CCL_APB | 109 | CLKMSK3.MSK13 | Enabled |
CLK_DMA0_AHB | 8 | CLKMSK0.MSK8 | Enabled |
CLK_DMA0_APB | 65 | CLKMSK2.MSK1 | Enabled |
CLK_DMA1_AHB | 9 | CLKMSK0.MSK9 | Enabled |
CLK_DMA1_APB | 66 | CLKMSK2.MSK2 | Enabled |
CLK_DSU_AHB | 3 | CLKMSK0.MSK3 | Enabled |
CLK_DSU_APB | 32 | CLKMSK1.MSK0 | Enabled |
CLK_EBI_AHB | 21 | CLKMSK0.MSK21 | Enabled |
CLK_EBI_APB | 114 | CLKMSK3.MSK18 | Enabled |
CLK_EIC_APB | 45 | CLKMSK1.MSK13 | Enabled |
CLK_ETH_AHB | 15 | CLKMSK0.MSK15 | Enabled |
CLK_ETH_APB | 111 | CLKMSK3.MSK15 | Enabled |
CLK_EVSYS_APB | 70 | CLKMSK2.MSK6 | Enabled |
CLK_FCR_AHB | 4 | CLKMSK0.MSK4 | Enabled |
CLK_FCR_APB | 33 | CLKMSK1.MSK1 | Enabled |
CLK_FCW_AHB | 5 | CLKMSK0.MSK5 | Enabled |
CLK_FCW_APB | 34 | CLKMSK1.MSK2 | Enabled |
CLK_FREQM_APB | 42 | CLKMSK1.MSK10 | Enabled |
CLK_HSM_AHB | 22 | CLKMSK0.MSK22 | Enabled |
CLK_IDAU_APB | 69 | CLKMSK2.MSK5 | Enabled |
CLK_MBISTINTF_APB | 50 | CLKMSK1.MSK18 | Enabled |
CLK_OSC32KCTRL_APB | 39 | CLKMSK1.MSK7 | Enabled |
CLK_OSCCTRL_APB | 38 | CLKMSK1.MSK6 | Enabled |
CLK_PAC_AHB | 6 | CLKMSK0.MSK6 | Enabled |
CLK_PAC_APB | 46 | CLKMSK1.MSK14 | Enabled |
CLK_PCC_APB | 108 | CLKMSK3.MSK12 | Enabled |
CLK_PDEC_APB | 110 | CLKMSK3.MSK14 | Enabled |
CLK_PORT_APB | 64 | CLKMSK2.MSK0 | Enabled |
CLK_PRM_AHB | 12 | CLKMSK0.MSK12 | Enabled |
CLK_PRM_APB | 68 | CLKMSK2.MSK4 | Enabled |
CLK_PTC_APB | 106 | CLKMSK3.MSK10 | Enabled |
CLK_RSTC_APB | 37 | CLKMSK1.MSK5 | Enabled |
CLK_RTC_APB | 44 | CLKMSK1.MSK12 | Enabled |
CLK_SDMMC0_AHB | 17 | CLKMSK0.MSK17 | Enabled |
CLK_SDMMC1_AHB | 18 | CLKMSK0.MSK18 | Enabled |
CLK_SERCOM0_APB | 71 | CLKMSK2.MSK7 | Enabled |
CLK_SERCOM1_APB | 72 | CLKMSK2.MSK8 | Enabled |
CLK_SERCOM2_APB | 73 | CLKMSK2.MSK9 | Enabled |
CLK_SERCOM3_APB | 74 | CLKMSK2.MSK10 | Enabled |
CLK_SERCOM4_APB | 96 | CLKMSK3.MSK0 | Enabled |
CLK_SERCOM5_APB | 97 | CLKMSK3.MSK1 | Enabled |
CLK_SERCOM6_APB | 98 | CLKMSK3.MSK2 | Enabled |
CLK_SERCOM7_APB | 99 | CLKMSK3.MSK3 | Enabled |
CLK_SPI_IXS_APB | 107 | CLKMSK3.MSK11 | Enabled |
CLK_SQI_AHB | 16 | CLKMSK0.MSK16 | Enabled |
CLK_TCC0_APB | 75 | CLKMSK2.MSK11 | Enabled |
CLK_TCC1_APB | 76 | CLKMSK2.MSK12 | Enabled |
CLK_TCC2_APB | 77 | CLKMSK2.MSK13 | Enabled |
CLK_TCC3_APB | 78 | CLKMSK2.MSK14 | Enabled |
CLK_TCC4_APB | 100 | CLKMSK3.MSK4 | Enabled |
CLK_TCC5_APB | 101 | CLKMSK3.MSK5 | Enabled |
CLK_TCC6_APB | 102 | CLKMSK3.MSK6 | Enabled |
CLK_TCC7_APB | 103 | CLKMSK3.MSK7 | Enabled |
CLK_TDM_APB | 51 | CLKMSK1.MSK19 | Enabled |
CLK_TRAM_APB | 47 | CLKMSK1.MSK15 | Enabled |
CLK_TRNG_APB | 112 | CLKMSK3.MSK16 | Enabled |
CLK_USB_AHB | 19 | CLKMSK0.MSK19 | Enabled |
CLK_USB_APB | 113 | CLKMSK3.MSK17 | Enabled |
CLK_USBHS_AHB | 20 | CLKMSK0.MSK20 | Enabled |
CLK_WDT_APB | 43 | CLKMSK1.MSK11 | 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 instance, AHB and APB), in which case it will have several mask bits.
Note that 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.