RZT Flexible Software Package Documentation
Release v2.2.0
|
|
Functions | |
fsp_err_t | R_POEG_Open (poeg_ctrl_t *const p_ctrl, poeg_cfg_t const *const p_cfg) |
fsp_err_t | R_POEG_StatusGet (poeg_ctrl_t *const p_ctrl, poeg_status_t *const p_status) |
fsp_err_t | R_POEG_CallbackSet (poeg_ctrl_t *const p_ctrl, void(*p_callback)(poeg_callback_args_t *), void const *const p_context, poeg_callback_args_t *const p_callback_memory) |
fsp_err_t | R_POEG_OutputDisable (poeg_ctrl_t *const p_ctrl) |
fsp_err_t | R_POEG_Reset (poeg_ctrl_t *const p_ctrl) |
fsp_err_t | R_POEG_Close (poeg_ctrl_t *const p_ctrl) |
Driver for the POEG peripheral on RZ microprocessor. This module implements the POEG Interface.
The POEG module can be used to configure events to disable GPT GTIOC output pins.
The POEG module has the following features:
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Multiplex Interrupt |
| Disabled | Enable multiplex interrupt for a single driver. |
Configuration | Options | Default | Description |
---|---|---|---|
General > Name | Name must be a valid C symbol | g_poeg0 | Module name. |
General > Channel | Must be a valid POEG channel | 0 | Specify the hardware channel. |
General > Group |
| A | Specify the hardware channel grpup. |
General > Trigger | MCU Specific Options | Select the trigger sources that will enable POEG. Software disable is always supported. This configuration can only be set once after reset. It cannot be modified after the initial setting. | |
Input > GTETRG Polarity |
| Active High | Select the polarity of the GTETRG pin. Only applicable if GTETRG pin is selected under Trigger. |
Input > GTETRG Noise Filter(Base clock CH0=PCLKH, Other=PCLKL) |
| Disabled | Configure the noise filter for the GTETRG pin. Only applicable if GTETRG pin is selected under Trigger. |
Interrupts > Callback | Name must be a valid C symbol | NULL | A user callback function can be specified here. If this callback function is provided, it will be called from the interrupt service routine (ISR) when GPT output pins are disabled by POEG. |
Interrupts > Interrupt Priority | MCU Specific Options | Select the POEG interrupt priority. |
The POEG clock is based on the PCLKL/PCLKH frequency. (PCLKH for LLPP and PCLKL for NONSAFETY and SAFETY).
This module can use GTETRGA, GTETRGB, GTETRGC, or GTETRGD and GTETRGSA, GTETRGSB as an input signal to disable GPT output pins.
The POEG channel number corresponds to the GTETRG input pin that can be used with the channel. GTETRGA, GTETRGB, GTETRGC, or GTETRGD must be used with POEG channel 0, 1(LLPP, NONSAFETY), GTETRGSA, GTETRGSB must be used with POEG channel 2(SAFETY), etc.
The user should be aware of the following limitations when using POEG:
The POEG interrupt type is a level interrupt. Please do the following: When clearing the interrupt status in interrupt processing, Check the interrupt status is cleared before terminating interrupt processing.
This is a basic example of minimal use of the POEG in an application.
This is an example of a using the POEG callback to restore GPT output operation.
Data Structures | |
struct | poeg_instance_ctrl_t |
struct poeg_instance_ctrl_t |
Channel control block. DO NOT INITIALIZE. Initialization occurs when poeg_api_t::open is called.
fsp_err_t R_POEG_Open | ( | poeg_ctrl_t *const | p_ctrl, |
poeg_cfg_t const *const | p_cfg | ||
) |
Initializes the POEG module and applies configurations. Implements poeg_api_t::open.
FSP_SUCCESS | Initialization was successful. |
FSP_ERR_ASSERTION | A required input pointer is NULL. |
FSP_ERR_ALREADY_OPEN | Module is already open. |
FSP_ERR_IRQ_BSP_DISABLED | poeg_cfg_t::p_callback is not NULL, but ISR is not enabled. ISR must be enabled to use callback. |
FSP_ERR_IP_CHANNEL_NOT_PRESENT | The channel requested in the p_cfg parameter is not available on this device. |
FSP_ERR_IP_UNIT_NOT_PRESENT | The Unit requested in the p_cfg parameter is not available on this device. |
fsp_err_t R_POEG_StatusGet | ( | poeg_ctrl_t *const | p_ctrl, |
poeg_status_t *const | p_status | ||
) |
Get current POEG status and store it in provided pointer p_status. Implements poeg_api_t::statusGet.
FSP_SUCCESS | Current POEG state stored successfully. |
FSP_ERR_ASSERTION | p_ctrl or p_status was NULL. |
FSP_ERR_NOT_OPEN | The instance is not opened. |
fsp_err_t R_POEG_CallbackSet | ( | poeg_ctrl_t *const | p_ctrl, |
void(*)(poeg_callback_args_t *) | p_callback, | ||
void const *const | p_context, | ||
poeg_callback_args_t *const | p_callback_memory | ||
) |
Updates the user callback with the option to provide memory for the callback argument structure. Implements poeg_api_t::callbackSet.
FSP_SUCCESS | Callback updated successfully. |
FSP_ERR_ASSERTION | A required pointer is NULL. |
FSP_ERR_NOT_OPEN | The control block has not been opened. |
fsp_err_t R_POEG_OutputDisable | ( | poeg_ctrl_t *const | p_ctrl | ) |
Disables GPT output pins. Implements poeg_api_t::outputDisable.
FSP_SUCCESS | GPT output pins successfully disabled. |
FSP_ERR_ASSERTION | p_ctrl was NULL. |
FSP_ERR_NOT_OPEN | The instance is not opened. |
fsp_err_t R_POEG_Reset | ( | poeg_ctrl_t *const | p_ctrl | ) |
Resets status flags. Implements poeg_api_t::reset.
FSP_SUCCESS | Function attempted to clear status flags. |
FSP_ERR_ASSERTION | p_ctrl was NULL. |
FSP_ERR_NOT_OPEN | The instance is not opened. |
fsp_err_t R_POEG_Close | ( | poeg_ctrl_t *const | p_ctrl | ) |
Disables POEG interrupt. Implements poeg_api_t::close.
FSP_SUCCESS | Successful close. |
FSP_ERR_ASSERTION | p_ctrl was NULL. |
FSP_ERR_NOT_OPEN | The instance is not opened. |