APP_DRV Configurations
Users can set the SoC series that APP_DRV supports, and the priority of peripherals to be woken up from sleep, by modifying macro definitions in app_drv_config.h. Details about the macro definitions are provided in the table below.
Macro | Value | Description |
---|---|---|
APP_DRIVER_GR551X |
0x0 |
Support GR551x series. |
APP_DRIVER_GR5525X |
0x1 |
Support GR5x25 series. |
APP_DRIVER_GR5526X |
0x2 |
Support GR5526 series. |
APP_DRIVER_GR5332X |
0x3 |
Support GR533x series. |
APP_DRIVER_GR5405 | 0x3 | Support GR5405 SoCs. |
APP_DRIVER_ADC_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of ADC to high. |
APP_DRIVER_AES_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of AES to middle. |
APP_DRIVER_COMP_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_LOW |
Set the wake-up priority of COMP to low. |
APP_DRIVER_DUAL_TIM_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of DUAL_TIM to middle. |
APP_DRIVER_DMA_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of DMA to high. |
APP_DRIVER_UART_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of UART to high. |
APP_DRIVER_HMAC_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of HMAC to middle. |
APP_DRIVER_I2C_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of I2C to high. |
APP_DRIVER_I2S_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of I2S to high. |
APP_DRIVER_QSPI_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of QSPI to high. |
APP_DRIVER_RNG_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of RNG to middle. |
APP_DRIVER_SPI_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of SPI to high. |
APP_DRIVER_TIM_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of TIM to middle. |
APP_DRIVER_PWM_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_MID |
Set the wake-up priority of PWM to middle. |
APP_DRIVER_ISO7816_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of ISO7816 to high. |
APP_DRIVER_PKC_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of PKC to high. |
APP_DRIVER_DSPI_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of DSPI to high. |
APP_DRIVER_PDM_WAKEUP_PRIORITY |
WAKEUP_PRIORITY_HIGH |
Set the wake-up priority of PDM to high. |
SOC_GPIO_PINS_MAX |
Defined based on the available pins of an SoC |
Set the number of GPIO pins. |
SOC_AON_PINS_MAX |
Defined based on the available pins of an SoC |
Set the number of AON_GPIO pins. |
Configuring Supported SoC Series
APP_DRV currently supports the following SoC series. Macro definitions and more details are provided below.
Macro | Value | Description |
---|---|---|
APP_DRIVER_GR551X |
0x0 |
GR551x |
APP_DRIVER_GR5525X |
0x1 |
GR5x25 |
APP_DRIVER_GR5526X |
0x2 |
GR5526 |
APP_DRIVER_GR5332X |
0x3 |
GR533x |
APP_DRIVER_GR5405 | 0x3 | GR5405 |
Users can choose the SoC series in use. For example, a GR551x SoC is represented by SOC_GR5515, which is defined in custom_config.h.
SoC Series | Macro |
---|---|
SOC_GR5515 |
APP_DRIVER_GR551X |
SOC_GR5x25 |
APP_DRIVER_GR5525X |
SOC_GR5526 |
APP_DRIVER_GR5526X |
SOC_GR533x |
APP_DRIVER_GR5332X |
SOC_GR5405 | APP_DRIVER_GR5405 |
Wake-up Priority Configuration
When the system is woken up from sleep, peripherals will be woken up according to the set priority.
wakeup_priority_t
The priority to wake up peripherals is enumerated as below.
Member | Description |
---|---|
WAKEUP_PRIORITY_LOW = 1 |
Low wake-up priority |
WAKEUP_PRIORITY_MID = 2 |
Middle wake-up priority |
WAKEUP_PRIORITY_HIGH = 3 |
High wake-up priority |
Users can configure the priority to wake up each peripheral as needed. For example, to set the wake-up priority of the ADC module, users can make the configuration as below.
#ifndef APP_DRIVER_ADC_WAKEUP_PRIORITY
#define APP_DRIVER_ADC_WAKEUP_PRIORITY WAKEUP_PRIORITY_HIGH /**< ADC Wakeup
priority High */
#endif