14.6.3.3 Selecting the Clock Source for a Peripheral
When changing a peripheral clock source by writing to the PCHCTRLm.GEN bit,
the peripheral clock must be disabled before re-enabling it with the new clock source
setting. This prevents glitches during the transition:
- Disable the Peripheral Channel by writing PCHCTRLm.CHEN = 0.
- Verify that PCHCTRLm.CHEN reads '0'.
- Change the source of the Peripheral Channel by writing PCHCTRLm.GEN.
- Re-enable the Peripheral Channel by writing PCHCTRLm.CHEN = 1.
- Assert that PCHCTRLm.CHEN reads '1'.