Driver API for SUPC (plib_supc.h) More...
Typedefs | |
| typedef void(* | SUPC_CALLBACK) (int event) |
| SUPC callback function type. | |
Enumerations | |
| enum | SUPC_EVENT { SUPC_EVENT_BODVDD , SUPC_EVENT_VDDIO , SUPC_EVENT_BVDDSRDY , SUPC_EVENT_VCORERDY , SUPC_EVENT_ULPVREFRDY } |
| SUPC event enumeration used for callbacks. More... | |
Functions | |
| void | SUPC_Initialize (void) |
| Initializes the SUPC peripheral. | |
| void | SUPC_SetPrivilegedAccess (void) |
| Enable privileged-only access to SUPC write-protected controls. | |
| void | SUPC_EnableInterrupt (void) |
| Enable SUPC interrupts. | |
| void | SUPC_DisableInterrupt (void) |
| Disable SUPC interrupts. | |
| void | SUPC_EnableEventOutput (void) |
| Enable SUPC event outputs. | |
| void | SUPC_DisableEventOutput (void) |
| Disable SUPC event outputs. | |
| void | SUPC_EnableWriteProtection (void) |
| Enable SUPC write protection. | |
| void | SUPC_BODVDD_Enable (void) |
| Enable the Brown-Out Detector for VDD (BODVDD). | |
| void | SUPC_BODVDD_VLM_Configure (void) |
| Configure the Voltage Level Monitor (VLM) for BODVDD. | |
| void | SUPC_BODVDD_LockConfiguration (void) |
| Lock the BODVDD configuration register against writes. | |
| void | SUPC_VREG_ForceLdoInStandby (void) |
| Force the main LDO regulator to remain on in Standby mode. | |
| void | SUPC_MVIO_SetConfiguration (void) |
| Configure the VDDIO2 (MVIO) power domain. | |
| void | SUPC_SetCallbackHandler (SUPC_CALLBACK callback) |
| Registers a callback handler for SUPC events. | |
| void | SUPC_DisableWriteProtection (void) |
| Disables SUPC write protection. | |
Driver API for SUPC (plib_supc.h)
| typedef void(* SUPC_CALLBACK) (int event) |
SUPC callback function type.
| event | The SUPC event that triggered the callback. |
| enum SUPC_EVENT |
| void SUPC_BODVDD_Enable | ( | void | ) |
Enable the Brown-Out Detector for VDD (BODVDD).
Sets the BODVDD enable bit. There is no runtime parameter in this API; add a complementary disable function if needed.
| void SUPC_BODVDD_LockConfiguration | ( | void | ) |
Lock the BODVDD configuration register against writes.
Sets the BODVDD write-lock bit; this is persistent until device reset.
| void SUPC_BODVDD_VLM_Configure | ( | void | ) |
Configure the Voltage Level Monitor (VLM) for BODVDD.
Updates VLM-related fields in the BODVDD register. The current implementation writes the VLM configuration fields using defined masks.
| void SUPC_DisableEventOutput | ( | void | ) |
Disable SUPC event outputs.
Disables the SUPC event outputs exposed by the component. The implementation clears the relevant EVCTRL bits.
| void SUPC_DisableInterrupt | ( | void | ) |
Disable SUPC interrupts.
Disables the SUPC interrupt bits defined by the device/component mask. The implementation clears the full component mask (INTENCLR_Msk).
| void SUPC_DisableWriteProtection | ( | void | ) |
Disables SUPC write protection.
Disables the local write-protection mechanism for SUPC registers.
| void SUPC_EnableEventOutput | ( | void | ) |
Enable SUPC event outputs.
Enables the SUPC event outputs exposed by the component (for example MVIO and VLM event outputs). The implementation sets the relevant EVCTRL bits.
| void SUPC_EnableInterrupt | ( | void | ) |
Enable SUPC interrupts.
Enables the SUPC interrupt bits defined by the device/component mask. The implementation enables the full component mask (INTENSET_Msk).
| void SUPC_EnableWriteProtection | ( | void | ) |
Enable SUPC write protection.
Enables the local write-protection mechanism for SUPC registers that support it. Once enabled these fields typically cannot be modified until a reset.
| void SUPC_Initialize | ( | void | ) |
Initializes the SUPC peripheral.
Leaves SUPC in a known state. Most SUPC configuration is loaded from NVM/user fuses on reset; add application-specific initialization here.
| void SUPC_MVIO_SetConfiguration | ( | void | ) |
Configure the VDDIO2 (MVIO) power domain.
Applies a default/sane MVIO configuration when the device is fused for Dual Supply mode. The function is a no-op when the device is not in Dual mode.
| void SUPC_SetCallbackHandler | ( | SUPC_CALLBACK | callback | ) |
Registers a callback handler for SUPC events.
| callback | The callback function to register. |
| void SUPC_SetPrivilegedAccess | ( | void | ) |
Enable privileged-only access to SUPC write-protected controls.
Configures the SUPC peripheral so that write-protected registers require privileged access to modify.
| void SUPC_VREG_ForceLdoInStandby | ( | void | ) |
Force the main LDO regulator to remain on in Standby mode.
Sets the SUPC VREG RUNSTDBY bit so the LDO stays on during standby. The public API takes no parameter in this implementation.