21.6.2.14.2 Function system_gclk_gen_set_config()
Writes a Generic Clock Generator configuration to the hardware module.
void system_gclk_gen_set_config( const uint8_t generator, struct system_gclk_gen_config *const config)
Writes out a given configuration of a Generic Clock Generator configuration to the hardware module.
Note: Changing the clock source on the fly (on a running generator) can take additional time if the clock source is configured to only run on-demand (ONDEMAND bit is set) and it is not currently running (no peripheral is requesting the clock source). In this case the GCLK will request the new clock while still keeping a request to the old clock source until the new clock source is ready.
Note: This function will not start a generator that is not already running; to start the generator, call system_gclk_gen_enable() after configuring a generator.
Data direction | Parameter name | Description |
---|---|---|
[in] | generator |
Generic Clock Generator index to configure |
[in] | config |
Configuration settings for the generator |