CMSIS-Driver_PIC32CM-PL  
Peripheral Library (PLIB) Documentation
 
Loading...
Searching...
No Matches
SUPC Interface

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.
 

Description

Driver API for SUPC (plib_supc.h)

Typedef Documentation

◆ SUPC_CALLBACK

typedef void(* SUPC_CALLBACK) (int event)

SUPC callback function type.

Parameters
eventThe SUPC event that triggered the callback.

Enumeration Type Documentation

◆ SUPC_EVENT

enum SUPC_EVENT

SUPC event enumeration used for callbacks.

Enumerator
SUPC_EVENT_BODVDD 
SUPC_EVENT_VDDIO 
SUPC_EVENT_BVDDSRDY 
SUPC_EVENT_VCORERDY 
SUPC_EVENT_ULPVREFRDY 

Function Documentation

◆ SUPC_BODVDD_Enable()

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.

◆ SUPC_BODVDD_LockConfiguration()

void SUPC_BODVDD_LockConfiguration ( void )

Lock the BODVDD configuration register against writes.

Sets the BODVDD write-lock bit; this is persistent until device reset.

◆ SUPC_BODVDD_VLM_Configure()

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.

◆ SUPC_DisableEventOutput()

void SUPC_DisableEventOutput ( void )

Disable SUPC event outputs.

Disables the SUPC event outputs exposed by the component. The implementation clears the relevant EVCTRL bits.

◆ SUPC_DisableInterrupt()

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

◆ SUPC_DisableWriteProtection()

void SUPC_DisableWriteProtection ( void )

Disables SUPC write protection.

Disables the local write-protection mechanism for SUPC registers.

◆ SUPC_EnableEventOutput()

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.

◆ SUPC_EnableInterrupt()

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

◆ SUPC_EnableWriteProtection()

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.

◆ SUPC_Initialize()

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.

◆ SUPC_MVIO_SetConfiguration()

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.

◆ SUPC_SetCallbackHandler()

void SUPC_SetCallbackHandler ( SUPC_CALLBACK callback)

Registers a callback handler for SUPC events.

Parameters
callbackThe callback function to register.

◆ SUPC_SetPrivilegedAccess()

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.

◆ SUPC_VREG_ForceLdoInStandby()

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.