4.9 Hardware Controlled Overrides
Another way to use the OPA module is to enable hardware overrides. The hardware controlled override allows for automatic switching between the following modes of operation:
- Basic operation with user-defined configuration
- Rail drive mode (VSS or VDD)
- Unity Gain mode
The hardware controlled override allows the device to switch between the above modes, core independently. There are two bit fields associated with the hardware controlled override feature: the HWCH and HWCL bits. HWCH controls the hardware controlled override behavior when the override signal is active high while HWCL controls the override when it is active low. This could be used as a way of auto-ranging an input signal. In this example, one of the comparators would act as a trigger for the hardware controlled override, with HWCH and HWCL set to Unity Gain mode and basic operation.
The hardware controlled override features a polarity bit (ORPOL), which can be used to invert the override signal. This enables an active-high signal to trigger the active-low configuration, and vice versa. This can be used in the case where a VDD output is desired when the source is low, since only HWCH can access the VDD rail drive, and HWCL can only access the VSS rail drive.
Hardware controlled overrides can be enabled using the following steps:
- Set OPAxORS to the trigger source.
- Setup OPAxHWC
- Configure HWCH and HWCL.
- Set ORPOL, if desired.
- If software control is used, configure the OPA module appropriately.
- Enable OREN.
ORPOL Bit | Override Source is High | Override Source is Low |
---|---|---|
0 | VDD | Unity Gain |
1 | Unity Gain | VDD |