1.2.4.4.5 SRV_PVDDMON_Restart Function
C
void SRV_PVDDMON_Restart ( SRV_PVDDMON_CMP_MODE cmpMode );
Summary
Restart the PVDD Monitor service.
Description
This routine restarts the PVDD Monitor service, and allows clients to modify the comparison mode in runtime. This routine is commonly used in the PVDD Monitor event handler to switch the comparison mode once ADC has been previously configured and is running.
Parameters
Param | Description |
---|---|
cmpMode | Comparison mode - SRV_PVDDMON_CMP_MODE |
Returns
None.
Example
static void APP_PLC_PVDDMonitorCb( SRV_PVDDMON_CMP_MODE cmpMode, uintptr_t context )
{
(void)context;
if (cmpMode == SRV_PVDDMON_CMP_MODE_OUT)
{
/* PLC Transmission is not permitted */
DRV_PLC_PHY_EnableTX(appPlc.drvPl360Handle, false);
appPlc.pvddMonTxEnable = false;
/* Restart PVDD Monitor to check when VDD is within the comparison window */
SRV_PVDDMON_Restart(SRV_PVDDMON_CMP_MODE_IN);
}
else
{
/* PLC Transmission is permitted again */
DRV_PLC_PHY_EnableTX(appPlc.drvPl360Handle, true);
appPlc.pvddMonTxEnable = true;
/* Restart PVDD Monitor to check when VDD is out of the comparison window */
SRV_PVDDMON_Restart(SRV_PVDDMON_CMP_MODE_OUT);
}
}
Remarks
Function SRV_PVDDMON_Start must have been called before calling this function.