Asynchronous Clock Counter Function Documentation
Sys_ASCC_GPIOConfig
void Sys_ASCC_GPIOConfig(uint32_t cfg, uint32_t sync, uint32_t async)
Location: ascc.h:48
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)
Location: ascc.h:69
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)
Location: ascc.h:83
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); |