SPRUJ79 November 2024 F29H850TU
Each ADC result safety checker tile can be configured to automatically compare two ADC conversion results against a set tolerance value, and generate an interrupt if an out-of-tolerance (OOT) event occurs. The selected results can be from the same ADC instance, or from different ADCs. The safety checker tiles exist outside of the ADC module, enabling the user application to compare results from two separate ADCs. To enable result safety checking, the application must first configure one or more ADCs to enable output of the desired results to the safety checker bus, and then configure the safety checker tile to compare those results.
To configure an ADC result safety checker tile:
Each of the two result selectors waits for the configured ADC result to become available on the bus. When an ADC result becomes available, the checker reads the result into the CHECKRESULTx register, and sets the CHECKSTATUS.RESxRDY flag. Once both results are available, the checker clears the RESxRDY flags, compares the two results against each other, and sets the CHECKSTATUS.OOT flag if the configured tolerance is exceeded. This flag is also reflected in the corresponding bit for the selected checker tile in the OOTFLG register, and can be cleared by writing 1 to the corresponding bit in the OOTFLGCLR register. The checker does not perform any new comparisons while the OOT flag is set; to enable new comparisons, the flag must be cleared.
If two conversion results arrive in one selector before the other selector result becomes available, the checker sets the RESxOVF flag. This overflow flag does not prevent the comparison from occurring—the flag is for information only. To clear the overflow flag, write 1 to the corresponding bit for the selected checker tile in the RESxOVFCLR register.