2.21 Comparator Voltage Reference (CVR)

The CVR peripheral generates voltage reference for the comparator (CMP). This voltage can be selected as positive input of the comparators in the device. This peripheral can also be used independently to generate a configurable voltage and the output can be routed to CVREFOUT pin.

Using The Library

CVR Peripheral library provides API's that can be used to perform below functionalities on the CVR peripheral.

  • Initialize the CVR

  • Turn on and turn off the peripheral

  • Write to the CVR value selection bits (4-bits).

Library Interface

Comparator Voltage Reference peripheral library provides the following interfaces:

Functions

NameDescription
CVR_InitializeInitializes CVR module of the device
CVR_StartTurns on the CVR module of the device
CVR_StopTurns off the CVR module of the device
CVR_UpdateValueWrites to the CVR value selection bits (4-bits)
Note: Not all APIs maybe implemented. See the specific device family section for available APIs.