10.4.2.3.3 Selecting the Clock Source for a Peripheral
When changing a peripheral clock source by writing to the Generator Selection bit field of
the Peripheral Channel Control register (PCHCTRLm.GEN), the peripheral clock must be
disabled before being re-enabled with the new clock source setting. The following actions
prevent glitches during the transition:
- Disable the peripheral channel by
setting the Channel Enable bit of the PCHCTRL[n] register (PCHCTRL[n].CHEN) to
‘
0’. - Verify that PCHCTRLm.CHEN reads
‘
0’. - Change the source of the peripheral channel by writing the corresponding value to PCHCTRLm.GEN.
- Re-enable the peripheral channel by
writing PCHCTRLm.CHEN to ‘
1’. - Verify that PCHCTRLm.CHEN reads
‘
1’.
