HPM SDK
HPMicro Software Development Kit
DGO driver APIs

PDGO driver APIs. More...

Functions

static void pdgo_set_turnoff_counter (PDGO_Type *ptr, uint32_t counter)
 Set DGO turn-off counter. More...
 
static void pdgo_enable_wkup_software_wakeup (PDGO_Type *ptr)
 Enable wakeup pin or software wakeup. More...
 
static void pdgo_disable_wkup_software_wakeup (PDGO_Type *ptr)
 Disable wakeup pin or software wakeup. More...
 
static void pdgo_enable_oneshot_wakeup (PDGO_Type *ptr)
 Set DGO to one-shot wakeup mode. More...
 
static void pdgo_enable_retention_mode (PDGO_Type *ptr)
 Enable DGO register retention mode. More...
 
static bool pdgo_is_retention_mode_enabled (PDGO_Type *ptr)
 Check whether the DGO retention mode is enabled or not. More...
 
static void pdgo_disable_retention_mode (PDGO_Type *ptr)
 Disable DGO register retention mode. More...
 
static void pdgo_enable_auto_wakeup (PDGO_Type *ptr)
 Set DGO to automatic wakeup mode. More...
 
static bool pdgo_is_pin_wakeup (PDGO_Type *ptr)
 Check whether DGO is waked up by Wake-up/Reset Pin. More...
 
static bool pdgo_is_auto_wakeup_enabled (PDGO_Type *ptr)
 Check whether Auto wake-up is enabled. More...
 
static void pdgo_enable_pullup_resistor_for_reset_pin (PDGO_Type *ptr)
 Enable pull-up resistor for Reset Pin [in] ptr DGO base address. More...
 
static void pdgo_disable_pullup_resistor_for_reset_pin (PDGO_Type *ptr)
 Disable pull-up resistor for Reset Pin [in] ptr DGO base address. More...
 
static void pdgo_enable_pulldown_resistor_for_wakeup_pin (PDGO_Type *ptr)
 
static void pdgo_disable_pulldown_resistor_for_wakeup_pin (PDGO_Type *ptr)
 
static void pdgo_set_wakeup_counter (PDGO_Type *ptr, uint32_t wakeup_ctr)
 Set DGO wakeup counter. More...
 
static uint32_t pdgo_get_wakeup_counter (PDGO_Type *ptr)
 Get DGO wakeup counter value. More...
 
static void pdgo_write_gpr (PDGO_Type *ptr, uint32_t index, uint32_t content)
 Write data to DGO GPR register. More...
 
static uint32_t pdgo_read_gpr (PDGO_Type *ptr, uint32_t index)
 Read data from DGO GPR register. More...
 
static uint32_t pdgo_get_wakeup_counter_from_us (uint32_t us)
 Convert the microsecond to DGO Wake-up counter value. More...
 
static uint32_t pdgo_get_us_from_wakeup_counter (uint32_t counter)
 Convert the DGO Wake-up counter to microseconds. More...
 
static uint32_t pdgo_get_turnoff_counter_from_us (uint32_t us)
 Convert the microsecond to DGO Turn-off counter value. More...
 
static uint32_t pdgo_get_us_from_turnoff_counter (uint32_t counter)
 Convert the DGO Turn-off counter to microseconds. More...
 

Detailed Description

PDGO driver APIs.

Function Documentation

◆ pdgo_disable_pulldown_resistor_for_wakeup_pin()

static void pdgo_disable_pulldown_resistor_for_wakeup_pin ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Disable pull-down resistor for Wakeup pin [in] ptr DGO base address

◆ pdgo_disable_pullup_resistor_for_reset_pin()

static void pdgo_disable_pullup_resistor_for_reset_pin ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Disable pull-up resistor for Reset Pin [in] ptr DGO base address.

◆ pdgo_disable_retention_mode()

static void pdgo_disable_retention_mode ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Disable DGO register retention mode.

Parameters
[in]ptrDGO base address

◆ pdgo_disable_wkup_software_wakeup()

static void pdgo_disable_wkup_software_wakeup ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Disable wakeup pin or software wakeup.

Parameters
[in]ptrDGO base address

◆ pdgo_enable_auto_wakeup()

static void pdgo_enable_auto_wakeup ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Set DGO to automatic wakeup mode.

Parameters
[in]ptrDGO base address

◆ pdgo_enable_oneshot_wakeup()

static void pdgo_enable_oneshot_wakeup ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Set DGO to one-shot wakeup mode.

Parameters
[in]ptrDGO base address

◆ pdgo_enable_pulldown_resistor_for_wakeup_pin()

static void pdgo_enable_pulldown_resistor_for_wakeup_pin ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Enable pull-down resistor for Wakeup pin [in] ptr DGO base address

◆ pdgo_enable_pullup_resistor_for_reset_pin()

static void pdgo_enable_pullup_resistor_for_reset_pin ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Enable pull-up resistor for Reset Pin [in] ptr DGO base address.

◆ pdgo_enable_retention_mode()

static void pdgo_enable_retention_mode ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Enable DGO register retention mode.

Parameters
[in]ptrDGO base address

◆ pdgo_enable_wkup_software_wakeup()

static void pdgo_enable_wkup_software_wakeup ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Enable wakeup pin or software wakeup.

Parameters
[in]ptrDGO base address

◆ pdgo_get_turnoff_counter_from_us()

static uint32_t pdgo_get_turnoff_counter_from_us ( uint32_t  us)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Convert the microsecond to DGO Turn-off counter value.

Parameters
[in]usmicrosecond to be converted
Returns
Converted DGO Turn-off counter value

< DGO Turn-off counter frequency

◆ pdgo_get_us_from_turnoff_counter()

static uint32_t pdgo_get_us_from_turnoff_counter ( uint32_t  counter)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Convert the DGO Turn-off counter to microseconds.

Parameters
[in]counterDGO Turn-off counter
Returns
Converted microseconds

< DGO Turn-off counter frequency

< DGO Turn-off counter frequency

◆ pdgo_get_us_from_wakeup_counter()

static uint32_t pdgo_get_us_from_wakeup_counter ( uint32_t  counter)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Convert the DGO Wake-up counter to microseconds.

Parameters
[in]counterDGO counter
Returns
Converted microseconds

< DGO Wakeup Counter frequency

◆ pdgo_get_wakeup_counter()

static uint32_t pdgo_get_wakeup_counter ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Get DGO wakeup counter value.

Parameters
[in]ptrDGO base address
Returns
DGO wakeup counter value

◆ pdgo_get_wakeup_counter_from_us()

static uint32_t pdgo_get_wakeup_counter_from_us ( uint32_t  us)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Convert the microsecond to DGO Wake-up counter value.

Parameters
[in]usmicrosecond to be converted
Returns
Converted DGO Wake-up counter value

< DGO Wakeup Counter frequency

< DGO Wakeup Counter frequency

◆ pdgo_is_auto_wakeup_enabled()

static bool pdgo_is_auto_wakeup_enabled ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Check whether Auto wake-up is enabled.

Parameters
[in]ptrDGO base address
Return values
true- Auto wake-up is enabled
false- Auto wake-up is disabled

◆ pdgo_is_pin_wakeup()

static bool pdgo_is_pin_wakeup ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Check whether DGO is waked up by Wake-up/Reset Pin.

Parameters
[in]ptrDGO base address
Return values
trueif DGO is waked up by Wakeup/Reset pin

◆ pdgo_is_retention_mode_enabled()

static bool pdgo_is_retention_mode_enabled ( PDGO_Type ptr)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Check whether the DGO retention mode is enabled or not.

Parameters
[in]ptrDGO base address
Return values
trueRetention mode is enabled
falseRetention mode is disabled

◆ pdgo_read_gpr()

static uint32_t pdgo_read_gpr ( PDGO_Type ptr,
uint32_t  index 
)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Read data from DGO GPR register.

Parameters
[in]ptrDGO base address
[in]indexGPR register index
Returns
DGO GPR register value

< DGO GPR register count

◆ pdgo_set_turnoff_counter()

static void pdgo_set_turnoff_counter ( PDGO_Type ptr,
uint32_t  counter 
)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Set DGO turn-off counter.

Parameters
[in]ptrDGO base address
[in]counterTurn-off counter value. Clock source is 24M

◆ pdgo_set_wakeup_counter()

static void pdgo_set_wakeup_counter ( PDGO_Type ptr,
uint32_t  wakeup_ctr 
)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Set DGO wakeup counter.

Parameters
[in]ptrDGO base address
[in]wakeup_ctrWakeup counter value. clock source is 32K

◆ pdgo_write_gpr()

static void pdgo_write_gpr ( PDGO_Type ptr,
uint32_t  index,
uint32_t  content 
)
inlinestatic

#include <soc/HPM5300/HPM5301/hpm_pdgo_drv.h>

Write data to DGO GPR register.

Parameters
[in]ptrDGO base address
[in]indexGPR register index
[in]contentData to be written to DGO GPR register

< DGO GPR register count