## Asynchronous Clock Counter Function Documentation

### Sys_ASCC_GPIOConfig

void Sys_ASCC_GPIOConfig(uint32_t cfg, uint32_t sync, uint32_t async)

Configure the sync pulse and asynchronous clock sources.

Location: ascc.h:83

Parameters

Direction | Name | Description
--- | --- | ---
in | cfg | GPIO pin configuration for the ASCC pads
in | sync | GPIO pad input for the synchronization pulse
in | async | GPIO pad input for the asynchronous clock source

Example Code for Sys_ASCC_GPIOConfig
// Configure GPIO pads to connect to the asynchronous clock counter Sys_ASCC_GPIOConfig(GPIO_MODE_INPUT | GPIO_WEAK_PULL_UP, GPIO0, GPIO1);

### Sys_ASCC_Config

void Sys_ASCC_Config(ASCC_Type * ascc, uint32_t cfg, uint32_t phasecnt, uint32_t periodcnt)

Configure the asynchronous clock counter and set initial phase and period count values.

Location: ascc.h:104

Parameters

Direction | Name | Description
--- | --- | ---
in | ascc | Pointer to the asynchronous clock counter instance
in | cfg | The number of clock periods the period counter measures; use ASCC_PERIODS_*
in | phasecnt | The clock phase counter initial value
in | periodcnt | The clock period counter initial value

Example Code for Sys_ASCC_Config
// Configure the ASCC to measure 16 periods // Set the inital count of the phase and period counts to 0 Sys_ASCC_Config(ASCC, ASCC_PERIODS_16, 0, 0);

### Sys_ASCC_StartCounters

void Sys_ASCC_StartCounters(ASCC_Type * ascc)

Reset the counter, and start the phase and period counter mechanisms.

Location: ascc.h:118

Parameters

Direction | Name | Description
--- | --- | ---
in | ascc | Pointer to the asynchronous clock counter instance

Example Code for Sys_ASCC_StartCounters
// Reset the ASCC counters and start counting again Sys_ASCC_StartCounters(ASCC);