|
SmartSnippets DA1459x SDK
|
Power domains Controller. More...
Files | |
| file | hw_pdc.h |
| Definition of API for the Power Domains Controller Low Level Driver. | |
Data Structures | |
| struct | hw_pdc_entry_t |
| PDC entry. More... | |
| struct | hw_pdc_lut_keep_t |
| PDC entries that will be kept after deep sleep. More... | |
Macros | |
| #define | HW_PDC_LUT_ENTRY_FIELD_MASK(field) (PDC_PDC_CTRL0_REG_##field##_Msk) |
| Get the mask of a field of a PDC LUT entry. More... | |
| #define | HW_PDC_LUT_ENTRY_FIELD_POS(field) (PDC_PDC_CTRL0_REG_##field##_Pos) |
| Get the bit position of a field of a PDC LUT entry. More... | |
| #define | HW_PDC_LUT_ENTRY_FIELD_VAL(field, val) (((val) << HW_PDC_LUT_ENTRY_FIELD_POS(field)) & HW_PDC_LUT_ENTRY_FIELD_MASK(field)) |
| Prepare (i.e. shift and mask) a value to be used for a PDC LUT entry field. More... | |
Functions | |
| __STATIC_INLINE uint32_t | hw_pdc_read_entry (uint32_t idx) |
| Read value from specific PDC LUT index. More... | |
| __RETAINED_CODE uint32_t | hw_pdc_add_entry (uint32_t lut_entry) |
| Add a PDC LUT entry dynamically. More... | |
| uint32_t | hw_pdc_remove_entry (uint32_t idx) |
| Remove a dynamically added PDC LUT entry. More... | |
| __STATIC_INLINE uint32_t | hw_pdc_get_pending (void) |
| Get all PDC LUT entries pending for any master. | |
| __STATIC_INLINE uint32_t | hw_pdc_get_pending_cm33 (void) |
| Get all PDC LUT entries pending for CM33. | |
| __STATIC_INLINE uint32_t | hw_pdc_get_pending_cmac (void) |
| Get all PDC LUT entries pending for CMAC. | |
| __STATIC_INLINE void | hw_pdc_acknowledge (uint32_t idx) |
| Acknowledge a PDC LUT entry. More... | |
| void | hw_pdc_write_entry (uint32_t idx, uint32_t value) |
| Write a value in specific PDC LUT index. More... | |
| __STATIC_INLINE HW_PDC_ERROR | hw_pdc_set_pending (uint32_t idx) |
| Set a PDC LUT entry as pending. More... | |
| __STATIC_FORCEINLINE bool | hw_pdc_is_pending (uint32_t idx) |
| Check if a PDC LUT entry is pending. More... | |
| void | hw_pdc_ack_all_pending_cm33 (void) |
| Acknowledge all PDC LUT entries pending for CM33. | |
| void | hw_pdc_lut_reset (void) |
| Reset PDC Lookup table. More... | |
| void | hw_pdc_lut_keep (hw_pdc_lut_keep_t *keep) |
| Keep only the selected PDC Lookup table entries. More... | |
| uint32_t | hw_pdc_find_entry (uint32_t trig_select, uint32_t trig_id, uint32_t wakeup_master, uint32_t flags, uint32_t start) |
| Get the first PDC LUT entry index matching specific criteria. More... | |
| __STATIC_FORCEINLINE void | hw_pdc_set_blocked_triggers (HW_PDC_BLOCKED_TRIG blocked) |
| Set PDC configuration register. More... | |
| __STATIC_FORCEINLINE HW_PDC_BLOCKED_TRIG | hw_pdc_get_blocked_triggers () |
| get PDC configuration register More... | |
Power domains Controller.
| #define HW_PDC_LUT_ENTRY_FIELD_MASK | ( | field | ) | (PDC_PDC_CTRL0_REG_##field##_Msk) |
Get the mask of a field of a PDC LUT entry.
| [in] | field | is the PDC LUT entry field to access |
| #define HW_PDC_LUT_ENTRY_FIELD_POS | ( | field | ) | (PDC_PDC_CTRL0_REG_##field##_Pos) |
Get the bit position of a field of a PDC LUT entry.
| [in] | field | is the PDC LUT entry field to access |
| #define HW_PDC_LUT_ENTRY_FIELD_VAL | ( | field, | |
| val | |||
| ) | (((val) << HW_PDC_LUT_ENTRY_FIELD_POS(field)) & HW_PDC_LUT_ENTRY_FIELD_MASK(field)) |
Prepare (i.e. shift and mask) a value to be used for a PDC LUT entry field.
| [in] | field | is the PDC LUT entry field to access |
| [in] | val | is the value to prepare |
| enum HW_PDC_BLOCKED_TRIG |
blocked PDC triggers
| enum HW_PDC_LUT_ENTRY_EN |
| enum HW_PDC_MASTER |
Peripheral PDC trigger IDs.
| enum HW_PDC_TRIG_SELECT |
Selects which wakeup source bank is selected as a trigger in a PDC LUT entry.
| __STATIC_INLINE void hw_pdc_acknowledge | ( | uint32_t | idx | ) |
Acknowledge a PDC LUT entry.
| [in] | idx | the index of the LUT entry to acknowledge. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| __RETAINED_CODE uint32_t hw_pdc_add_entry | ( | uint32_t | lut_entry | ) |
Add a PDC LUT entry dynamically.
Scans all LUT entries until it finds an unused one. A LUT entry shall be considered unused if it equals zero.
| [in] | lut_entry | value for the LUT entry |
| uint32_t hw_pdc_find_entry | ( | uint32_t | trig_select, |
| uint32_t | trig_id, | ||
| uint32_t | wakeup_master, | ||
| uint32_t | flags, | ||
| uint32_t | start | ||
| ) |
Get the first PDC LUT entry index matching specific criteria.
This function returns the first matching entry after starting entry with the below criteria. In case we are not interesting in one or more criteria we could use the value HW_PDC_FILTER_DONT_CARE, thus this function will return the index of the entry which matches to the remaining criteria.
| [in] | trig_select | LUT entry triggering type GPIO/peripheral |
| [in] | trig_id | LUT entry Pin_ID/Periph_ID |
| [in] | wakeup_master | LUT entry wake up Master_ID |
| [in] | flags | LUT entry action(s) |
| [in] | start | Starting PDC entry search point |
| __STATIC_FORCEINLINE HW_PDC_BLOCKED_TRIG hw_pdc_get_blocked_triggers | ( | ) |
get PDC configuration register
| __STATIC_FORCEINLINE bool hw_pdc_is_pending | ( | uint32_t | idx | ) |
Check if a PDC LUT entry is pending.
| [in] | idx | the index of the PDC LUT entry. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| void hw_pdc_lut_keep | ( | hw_pdc_lut_keep_t * | keep | ) |
Keep only the selected PDC Lookup table entries.
Invalidates all PDC lookup table entries except those set to be kept
| [in] | keep | pointer to an array with the LUT entries that will be kept |
| void hw_pdc_lut_reset | ( | void | ) |
Reset PDC Lookup table.
Invalidates all PDC lookup table entries
| __STATIC_INLINE uint32_t hw_pdc_read_entry | ( | uint32_t | idx | ) |
Read value from specific PDC LUT index.
| [in] | idx | LUT index to read from. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| uint32_t hw_pdc_remove_entry | ( | uint32_t | idx | ) |
Remove a dynamically added PDC LUT entry.
Zero shall be written in the LUT entry at the given index.
| [in] | idx | the index of the LUT entry to remove. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| __STATIC_FORCEINLINE void hw_pdc_set_blocked_triggers | ( | HW_PDC_BLOCKED_TRIG | blocked | ) |
Set PDC configuration register.
| [in] | blocked | type of PDC configured entries |
| __STATIC_INLINE HW_PDC_ERROR hw_pdc_set_pending | ( | uint32_t | idx | ) |
Set a PDC LUT entry as pending.
| [in] | idx | the index of the PDC LUT entry. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| void hw_pdc_write_entry | ( | uint32_t | idx, |
| uint32_t | value | ||
| ) |
Write a value in specific PDC LUT index.
| [in] | idx | LUT index to write at. Valid range: Range 0 - (HW_PDC_LUT_SIZE-1) |
| [in] | value | value to be written |
1.8.16