CN / EN
Doc Feedback
Thanks for your interest, welcome to contact us.
Thanks for your feedback
No matches were found 114page(s) matching the search query
Documentation > GR5xx APP Driver User Manual/ Overview/ APP_DRV Configurations Copy URL

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.

Table 2 Macro definitions in app_drv_config.h
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_ADC_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of ADC to high.

APP_DRIVER_AES_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of AES to middle.

APP_DRIVER_COMP_WAPEUP_PRIORITY

WAPEUP_PRIORITY_LOW

Set the wake-up priority of COMP to low.

APP_DRIVER_DUAL_TIM_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of DUAL_TIM to middle.

APP_DRIVER_DMA_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of DMA to high.

APP_DRIVER_UART_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of UART to high.

APP_DRIVER_HMAC_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of HMAC to middle.

APP_DRIVER_I2C_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of I2C to high.

APP_DRIVER_I2S_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of I2S to high.

APP_DRIVER_QSPI_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of QSPI to high.

APP_DRIVER_RNG_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of RNG to middle.

APP_DRIVER_SPI_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of SPI to high.

APP_DRIVER_TIM_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of TIM to middle.

APP_DRIVER_PWM_WAPEUP_PRIORITY

WAPEUP_PRIORITY_MID

Set the wake-up priority of PWM to middle.

APP_DRIVER_ISO7816_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of ISO7816 to high.

APP_DRIVER_PKC_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of PKC to high.

APP_DRIVER_DSPI_WAPEUP_PRIORITY

WAPEUP_PRIORITY_HIGH

Set the wake-up priority of DSPI to high.

APP_DRIVER_PDM_WAPEUP_PRIORITY

WAPEUP_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.

Table 3 Supported SoC series
Macro Value Description

APP_DRIVER_GR551X

0x0

GR551x

APP_DRIVER_GR5525X

0x1

GR5x25

APP_DRIVER_GR5526X

0x2

GR5526

APP_DRIVER_GR5332X

0x3

GR533x

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.

Table 4 Choosing the SoC series
SoC Series Macro

SOC_GR5515

APP_DRIVER_GR551X

SOC_GR5x25

APP_DRIVER_GR5525X

SOC_GR5526

APP_DRIVER_GR5526X

SOC_GR533x

APP_DRIVER_GR5332X

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.

Table 5 wakeup_priority_t
Member Description

WAPEUP_PRIORITY_LOW = 1

Low wake-up priority

WAPEUP_PRIORITY_MID = 2

Middle wake-up priority

WAPEUP_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_WAPEUP_PRIORITY
#define APP_DRIVER_ADC_WAPEUP_PRIORITY              WAPEUP_PRIORITY_HIGH  /**< ADC Wakeup 
                                                                         priority High */
#endif

Scan to follow

Open WeChat, use "Scan" to follow.