PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Data Structures
Data Structures
PDL API Reference » AUTONOMOUS ANALOG (Autonomous Analog Block) » AC (Autonomous Controller)

## General Description

## Data Structures
struct | cy_stc_autanalog_timer_t
| The AC wake-up Timer configuration structure. More...
struct | cy_stc_autanalog_ac_t
| The AC configuration structure. More...
struct | cy_stc_autanalog_state_ac_t
| The AC state configuration structure. More...
struct | cy_stc_autanalog_state_tc_t
| The AC Loop/Interval counter state configuration structure. More...
struct | cy_stc_autanalog_state_t
| The Autonomous Analog state. More...
struct | cy_stc_autanalog_stt_ac_t
| The AC section in the State Transition Table state. More...

## Data Structure Documentation

## ◆ cy_stc_autanalog_timer_t

struct cy_stc_autanalog_timer_t

Data Fields
bool | enable | Enable the wake-up Timer. FALSE - Disabled; TRUE - Enabled; This Timer (down counter) is used by the AC as a wake-up source (ACTION is WAIT_FOR and CONDITION is TIMER_DONE_WAKE). Note Even if enabled, it is held in Reset until the AC is running (cy_stc_autanalog_state_ac_t::status). The Timer automatically resets whenever the AC transitions between HS and LP modes, is paused, or disabled. The Timer will generate a wake-up signal to the AC whenever it reaches Terminal Count (0)
cy_en_autanalog_timer_clk_src_t | clkSrc | The AC Timer clock source.
uint16_t | period | The Timer period in clocks, actual timer period is PER_VAL + 1 (1 to 65536)

## ◆ cy_stc_autanalog_ac_t

struct cy_stc_autanalog_ac_t

Data Fields
cy_en_autanalog_stt_ac_gpio_out_t | gpioOutEn | Control four GPIO outputs with the AC, see also cy_stc_autanalog_stt_ac_t::unlockGpioOut. Note Set the bits in this field prior to writing to cy_stc_autanalog_stt_ac_t::gpioOut
cy_en_autanalog_ac_out_trigger_mask_t * | mask[CY_AUTANALOG_TRIG_OUT_NUM] | Control the AC output triggers.
cy_stc_autanalog_timer_t | timer | The AC wake-up Timer.

## ◆ cy_stc_autanalog_state_ac_t

struct cy_stc_autanalog_state_ac_t

Data Fields
cy_en_autanalog_ac_status_t | status | Current status of the AC.
uint8_t | state | Current state of the AC in the STT. This field indicates where which AC State (0-63) the AC will execute instructions from when it receives a RUN or SINGLE_STEP command. Hardware updates this field whenever the AC transitions from RUNNING to STOPPED or PAUSED. When STOPPED or PAUSED, firmware can overwrite this field to force the AC to execute from a specific STATE when triggered by a subsequent RUN or SINGLE_STEP command. Note This field must never be written to if cy_stc_autanalog_state_ac_t::status is equal to CY_AUTANALOG_AC_STATUS_RUNNING. This register is reset whenever the following occurs: The AC is disabled (Cy_AutAnalog_Disable) The Autonomous Analog is configured for HS mode (cy_stc_autanalog_state_t::lpModeEnabled) and the chip leaves an Active Mode.

## ◆ cy_stc_autanalog_state_tc_t

struct cy_stc_autanalog_state_tc_t

Data Fields
uint16_t | val | The current value of the Loop/Interval counter.
uint8_t | state | The current STT state tied to this Loop/Interval counter (valid numbers are 0-63)
bool | busy | The current Loop/Interval counter busy status (i.e. count value is non-zero)

## ◆ cy_stc_autanalog_state_t

struct cy_stc_autanalog_state_t

Data Fields
bool | lpModeEnabled | Current operational mode of the Autonomous Analog. FALSE - HS mode; TRUE - LP mode; Note In HS mode, the Autonomous Analog is functional only in chip Active modes. The Autonomous Analog is clocked from a peripheral source derived from CLK_HF, General Configuration Considerations; In LP mode, the Autonomous Analog is functional in both chip Active and DeepSleep modes. The Autonomous Analog is clocked from the internal LPOSC. The Autonomous Analog always resets to HS mode. This field is reset whenever the following occurs: The AC is disabled (Cy_AutAnalog_Disable) The Autonomous Analog is configured for HS mode (cy_stc_autanalog_state_t::lpModeEnabled is false) and the chip leaves an Active Mode
cy_stc_autanalog_state_ac_t | ac | Current operational state of the AC.
cy_stc_autanalog_state_tc_t | tc[CY_AUTANALOG_TC_NUM] | Current operational state of the Loop/Interval counters,. Note Four Loop/Interval counters or up to 3 loop counters and 1 interval counter are available for the AC

## ◆ cy_stc_autanalog_stt_ac_t

struct cy_stc_autanalog_stt_ac_t

Data Fields
bool | unlock | AC mode unlock: FALSE - Locked: the AC operating mode will NOT be taken into account in the corresponding state of STT TRUE - Unlocked: the AC operating mode will be used in the STT corresponding state
bool | lpMode | The operational mode of the Autonomous Analog. FALSE - HS mode; TRUE - LP mode; Note In HS mode, the AC is clocked from CLK_HF directly (nominally 80MHz) and functions only in chip Active mode (i.e. the IP is reset in chip DeepSleep and Hibernate). In LP mode, the AC is clocked from CLK_LPOSC (4.096MHz) and functions only in chip Active and Deep Sleep mode (i.e. the IP is only reset in Hibernate).
cy_en_autanalog_stt_ac_condition_t | condition | The AC CONDITION in the corresponding state of the STT.
cy_en_autanalog_stt_ac_action_t | action | The AC ACTION in the corresponding state of the STT.
uint8_t | branchState | The AC branch state depends on cy_stc_autanalog_stt_ac_t::condition. The range is 0 to 63 Note This field in only used if the AC ACTION is set to BRANCH_IF_* and the CONDITION is met.
bool | trigInt | AC Interrupt Set. This field is used for setting the AC Interrupt and/or trigger. When set in a particular state, the AC generates a single cycle pulse to the interrupt logic. The AC interrupt or AC trigger must be unmasked for this field to generate an interrupt/trigger. Note If ACTION is WAIT_FOR, the single cycle pulse is generated after the CONDITION occurs, otherwise the single cycle pulse is sent immediately upon entering the state where the field is set.
uint16_t | count | This field is used to set the value for both interval and loop counts. The actual count is CNT + 1. Therefore, the range is 1 to 4096. The value of 1 is degenerate. Note This field is only valid if the ACTION is set to WAIT_FOR or BRANCH_IF_* and the CONDITION is set to CNT_DONE. If ACTION is set to WAIT_FOR, the counter is first loaded with CNT + 1 and is subsequently decremented every clock cycle (clock set by cy_stc_autanalog_stt_ac_t::lpMode). On terminal count, the CNT_DONE trigger is asserted. If ACTION is set to BRANCH_IF_*, the counter is first checked if it is busy (count value is non-zero). If busy, the counter is decremented. If not busy, the counter is loaded with CNT + 1. On terminal count, the CNT_DONE trigger is asserted.
bool | unlockGpioOut | Unlock the AC digital output: FALSE - Locked: Data from field cy_stc_autanalog_stt_ac_t::gpioOut of this structure is NOT taken into account in the corresponding state of STT; TRUE - Unlocked: Data from field cy_stc_autanalog_stt_ac_t::gpioOut of this structure are used in the STT corresponding state;
cy_en_autanalog_stt_ac_gpio_out_t | gpioOut | The Autonomous Analog data out generation (the corresponding bit in cy_stc_autanalog_ac_t::gpioOutEn must be set when using this field). Note The data out bus is driven directly to the GPIO HSIO interface. The HSIO interface must be programmed properly for the DOUT bus to be observed on the GPIO pins.