Hardware Abstraction Layer (HAL)
COMP (Analog Comparator)

On PSoC 6, the COMP driver can use either of two underlying hardware blocks:

Generally, a set of pins can only connect to either an Opamp or an LPComp but not both. In the event that both connections are possible, the LPComp will be preferred.

Power Level Mapping

The following table shows how the HAL-defined power levels map to the hardware-specific power levels

HAL Power Level Opamp Power Level LPComp Power Level
CYHAL_POWER_LEVEL_HIGH CY_CTB_POWER_HIGH CY_LPCOMP_MODE_NORMAL
CYHAL_POWER_LEVEL_MEDIUM CY_CTB_POWER_MEDIUM CY_LPCOMP_MODE_LP
CYHAL_POWER_LEVEL_LOW CY_CTB_POWER_LOW CY_LPCOMP_MODE_ULP
CYHAL_POWER_LEVEL_DEFAULT CY_CTB_POWER_MEDIUM CY_LPCOMP_MODE_LP