Interface for the Port Output Enable for GPT.
Defines the API and data structures for the Port Output Enable for GPT (POEG) interface.
Summary
The POEG disables GPT output pins based on configurable events.
Implemented by: Port Output Enable for GPT (r_poeg)
◆ poeg_status_t
◆ poeg_callback_args_t
struct poeg_callback_args_t |
Callback function parameter data.
Data Fields |
void const * |
p_context |
Placeholder for user data, set in poeg_cfg_t. |
◆ poeg_cfg_t
User configuration structure, used in the open function.
◆ p_callback
Callback called when a POEG interrupt occurs.
◆ p_context
void const* poeg_cfg_t::p_context |
◆ poeg_api_t
Port Output Enable for GPT (POEG) API structure. POEG functions implemented at the HAL layer will follow this API.
◆ open
Initial configuration.
- Implemented as
-
- Parameters
-
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
◆ statusGet
Gets the current driver state.
- Implemented as
-
- Parameters
-
[in] | p_ctrl | Control block set in poeg_api_t::open call. |
[out] | p_status | Provides the current state of the POEG. |
◆ callbackSet
Specify callback function and optional context pointer and working memory pointer.
- Implemented as
-
- Parameters
-
[in] | p_ctrl | Control block set in poeg_api_t::open call for this timer. |
[in] | p_callback | Callback function to register |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
◆ outputDisable
Disables GPT output pins by software request.
- Implemented as
-
- Parameters
-
◆ reset
Attempts to clear status flags to reenable GPT output pins. Confirm all status flags are cleared after calling this function by calling poeg_api_t::statusGet().
- Implemented as
-
- Parameters
-
◆ close
Disables POEG interrupt.
- Implemented as
-
- Parameters
-
◆ poeg_instance_t
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields |
poeg_ctrl_t * |
p_ctrl |
Pointer to the control structure for this instance. |
poeg_cfg_t const * |
p_cfg |
Pointer to the configuration structure for this instance. |
poeg_api_t const * |
p_api |
Pointer to the API structure for this instance. |
◆ poeg_ctrl_t
POEG control block. Allocate an instance specific control block to pass into the POEG API calls.
- Implemented as
-
◆ poeg_state_t
POEG states.
Enumerator |
---|
POEG_STATE_NO_DISABLE_REQUEST | GPT output is not disabled by POEG.
|
POEG_STATE_PIN_DISABLE_REQUEST | GPT output disabled due to GTETRG pin level.
|
POEG_STATE_GPT_OR_COMPARATOR_DISABLE_REQUEST | GPT output disabled due to high speed analog comparator or GPT.
|
POEG_STATE_OSCILLATION_STOP_DISABLE_REQUEST | GPT output disabled due to main oscillator stop.
|
POEG_STATE_SOFTWARE_STOP_DISABLE_REQUEST | GPT output disabled due to poeg_api_t::outputDisable()
|
POEG_STATE_PIN_DISABLE_REQUEST_ACTIVE | GPT output disable request active from the GTETRG pin. If a filter is used, this flag represents the state of the filtered input.
|
◆ poeg_trigger_t
Triggers that will disable GPT output pins.
Enumerator |
---|
POEG_TRIGGER_SOFTWARE | Software disable is always supported with POEG. Select this option if no other triggers are used.
|
POEG_TRIGGER_PIN | Disable GPT output based on GTETRG input level.
|
POEG_TRIGGER_GPT_OUTPUT_LEVEL | Disable GPT output based on GPT output pin levels.
|
POEG_TRIGGER_OSCILLATION_STOP | Disable GPT output based on main oscillator stop.
|
POEG_TRIGGER_ACMPHS0 | Disable GPT output based on ACMPHS0 comparator result.
|
POEG_TRIGGER_ACMPHS1 | Disable GPT output based on ACMPHS1 comparator result.
|
POEG_TRIGGER_ACMPHS2 | Disable GPT output based on ACMPHS2 comparator result.
|
POEG_TRIGGER_ACMPHS3 | Disable GPT output based on ACMPHS3 comparator result.
|
POEG_TRIGGER_ACMPHS4 | Disable GPT output based on ACMPHS4 comparator result.
|
POEG_TRIGGER_ACMPHS5 | Disable GPT output based on ACMPHS5 comparator result.
|
◆ poeg_gtetrg_polarity_t
GTETRG polarity.
Enumerator |
---|
POEG_GTETRG_POLARITY_ACTIVE_HIGH | Disable GPT output based when GTETRG input level is high.
|
POEG_GTETRG_POLARITY_ACTIVE_LOW | Disable GPT output based when GTETRG input level is low.
|
◆ poeg_gtetrg_noise_filter_t
GTETRG noise filter. For the input signal to pass through the noise filter, the active level set in poeg_gtetrg_polarity_t must be read 3 consecutive times at the sampling clock selected.
Enumerator |
---|
POEG_GTETRG_NOISE_FILTER_DISABLED | No noise filter applied to GTETRG input.
|
POEG_GTETRG_NOISE_FILTER_PCLKB_DIV_1 | Apply noise filter with sample clock P0CLK.
|
POEG_GTETRG_NOISE_FILTER_PCLKB_DIV_8 | Apply noise filter with sample clock P0CLK/8.
|
POEG_GTETRG_NOISE_FILTER_PCLKB_DIV_32 | Apply noise filter with sample clock P0CLK/32.
|
POEG_GTETRG_NOISE_FILTER_PCLKB_DIV_128 | Apply noise filter with sample clock P0CLK/128.
|