This set of functions impacts all opamps on the chip.
Notice how some of these functions do not take a base address input. When calling Cy_CTB_SetCurrentMode for a CTB instance on the device, it should be called for all other CTB instances as well. This is because there is only one IPTAT level (1 uA or 100 nA) chip wide.
Functions | |
void | Cy_CTB_SetCurrentMode (CTBM_Type *base, cy_en_ctb_current_mode_t currentMode) |
High level function to configure the current modes of the opamps. More... | |
__STATIC_INLINE void | Cy_CTB_SetIptatLevel (cy_en_ctb_iptat_t iptat) |
Set the IPTAT reference level to 1 uA or 100 nA. More... | |
__STATIC_INLINE void | Cy_CTB_SetClkPumpSource (cy_en_ctb_clk_pump_source_t clkPump) |
Set the clock source for both charge pumps in the CTB. More... | |
__STATIC_INLINE void | Cy_CTB_EnableRedirect (void) |
Normally, the AREF IZTAT is routed to the CTB IZTAT and the AREF IPTAT is routed to the CTB IPTAT: More... | |
__STATIC_INLINE void | Cy_CTB_DisableRedirect (void) |
Disable the redirection of the AREF IPTAT to the CTB IZTAT for all opamps on the device as enabled by Cy_CTB_EnableRedirect. More... | |
void Cy_CTB_SetCurrentMode | ( | CTBM_Type * | base, |
cy_en_ctb_current_mode_t | currentMode | ||
) |
High level function to configure the current modes of the opamps.
This function configures all opamps of the CTB to the same current mode. These modes are differentiated by the reference current level, the opamp input range, and the Deep Sleep mode operation.
Current Mode | IPTAT Level | Input Range | Deep Sleep Operation |
---|---|---|---|
CY_CTB_CURRENT_HIGH_ACTIVE | 1 uA | Rail-to-Rail (charge pump enabled) | Disabled in Deep Sleep |
CY_CTB_CURRENT_HIGH_ACTIVE_DEEPSLEEP | 1 uA | 0 - VDDA-1.5 V (charge pump disabled) | Enabled in Deep Sleep |
CY_CTB_CURRENT_LOW_ACTIVE_DEEPSLEEP | 100 nA | 0 - VDDA-1.5 V (charge pump disabled) | Enabled in Deep Sleep |
base | Pointer to structure describing registers |
currentMode | Current mode selection |
__STATIC_INLINE void Cy_CTB_SetIptatLevel | ( | cy_en_ctb_iptat_t | iptat | ) |
Set the IPTAT reference level to 1 uA or 100 nA.
The IPTAT generator is used by the CTB for slope offset drift.
iptat | Value from enum cy_en_ctb_iptat_t |
__STATIC_INLINE void Cy_CTB_SetClkPumpSource | ( | cy_en_ctb_clk_pump_source_t | clkPump | ) |
Set the clock source for both charge pumps in the CTB.
Recall that each opamp has its own charge pump. The clock can come from:
clkPump | Clock source selection (SRSS or PeriClk) for the pump. Select a value from cy_en_ctb_clk_pump_source_t |
__STATIC_INLINE void Cy_CTB_EnableRedirect | ( | void | ) |
Normally, the AREF IZTAT is routed to the CTB IZTAT and the AREF IPTAT is routed to the CTB IPTAT:
However, the AREF IPTAT can be redirected to the CTB IZTAT and the CTB IPTAT is off.
The redirection applies to all opamps on the device and should be used when the IPTAT bias level is set to 100 nA (see Cy_CTB_SetIptatLevel).
When the CTB.IPTAT is HiZ, the CTB cannot compensate for the slope of the offset across temperature.
__STATIC_INLINE void Cy_CTB_DisableRedirect | ( | void | ) |
Disable the redirection of the AREF IPTAT to the CTB IZTAT for all opamps on the device as enabled by Cy_CTB_EnableRedirect.