Definitions related to error handling for Class B tests.
In order to make the library as flexible as possible, the user can configure the response to the different errors that can appear during the tests. Therefore, the user is responsible to handle the errors in a way such that the application is safe and reliable.
Enumerations | |
enum | classb_error_value { CLASSB_ERROR_NONE = 0x00, CLASSB_ERROR_WDT = 0x01, CLASSB_ERROR_ANALOG = 0x02, CLASSB_ERROR_CRC = 0x04, CLASSB_ERROR_FREQ = 0x08, CLASSB_ERROR_INT = 0x10, CLASSB_ERROR_CPU = 0x20, CLASSB_ERROR_SRAM = 0x40, CLASSB_ERROR_OTHER = 0x80 } |
Class B error values for the global error variable. More... | |
Global variables defined in the main application. | |
NO_INIT enum classb_error_value | classb_error |
Global error indicator, defined in main.c. More... | |
Error handlers for Class B tests. | |
These are the statements that should be run if a test fails.
| |
#define | CLASSB_ERROR_HANDLER_ANALOG() |
Error handler for the ADC, DAC and analog multiplexer test. More... | |
#define | CLASSB_ERROR_HANDLER_CRC() |
Error handler for the CRC test. More... | |
#define | CLASSB_ERROR_HANDLER_FREQ() |
Error handler for the CPU frequency test. More... | |
#define | CLASSB_ERROR_HANDLER_INTERRUPT() |
Error handler for the interrupt monitor. More... | |
#define | CLASSB_ERROR_HANDLER_REGISTERS() |
Error handler for the CPU registers test. More... | |
#define | CLASSB_ERROR_HANDLER_SRAM() |
Error handler for the SRAM test. More... | |
#define | CLASSB_ERROR_HANDLER_WDT() |
Error handler for watchdog timer test. More... | |
Configurable actions and conditions for Class B tests. | |
Some tests have a configurable behavior.
| |
#define | CLASSB_CONDITION1_INTERRUPT (!classb_error) |
Condition to assign a new state. More... | |
#define | CLASSB_CONDITION2_INTERRUPT (classb_error) |
Condition to stop checking interrupts within the monitor. More... | |
#define | CLASSB_ACTIONS_RTC() ; |
Configurable actions in the RTC interrupt. More... | |
#define | CLASSB_ACTIONS_WDT_RUNTIME_FAILURE() |
First group of configurable actions in the watchdog timer test. More... | |
#define | CLASSB_ACTIONS_WDT_OTHER_FAILURE() do{ } while (0) |
Second group of configurable actions in the watchdog timer test. More... | |
#define CLASSB_ACTIONS_RTC | ( | ) | ; |
Configurable actions in the RTC interrupt.
Referenced by classb_rtc_callback().
#define CLASSB_ACTIONS_WDT_OTHER_FAILURE | ( | ) | do{ } while (0) |
Second group of configurable actions in the watchdog timer test.
Referenced by classb_wdt_test().
#define CLASSB_ACTIONS_WDT_RUNTIME_FAILURE | ( | ) |
First group of configurable actions in the watchdog timer test.
Referenced by classb_wdt_test().
#define CLASSB_CONDITION1_INTERRUPT (!classb_error) |
Condition to assign a new state.
Referenced by classb_intmon_set_state().
#define CLASSB_CONDITION2_INTERRUPT (classb_error) |
Condition to stop checking interrupts within the monitor.
Referenced by classb_intmon_callback().
#define CLASSB_ERROR_HANDLER_ANALOG | ( | ) |
Error handler for the ADC, DAC and analog multiplexer test.
Referenced by classb_dac_adc_test().
#define CLASSB_ERROR_HANDLER_CRC | ( | ) |
Error handler for the CRC test.
Referenced by CLASSB_CRC16_EEPROM_HW(), CLASSB_CRC16_EEPROM_SW(), CLASSB_CRC16_Flash_HW(), CLASSB_CRC16_Flash_SW(), CLASSB_CRC32_EEPROM_HW(), CLASSB_CRC32_EEPROM_SW(), CLASSB_CRC32_Flash_HW(), and CLASSB_CRC32_Flash_SW().
#define CLASSB_ERROR_HANDLER_FREQ | ( | ) |
Error handler for the CPU frequency test.
Referenced by classb_freq_callback(), and classb_freq_tc_callback().
#define CLASSB_ERROR_HANDLER_INTERRUPT | ( | ) |
Error handler for the interrupt monitor.
Referenced by classb_intmon_callback(), and classb_intmon_set_state().
#define CLASSB_ERROR_HANDLER_REGISTERS | ( | ) |
Error handler for the CPU registers test.
Referenced by classb_register_test().
#define CLASSB_ERROR_HANDLER_SRAM | ( | ) |
Error handler for the SRAM test.
Referenced by classb_march_x().
#define CLASSB_ERROR_HANDLER_WDT | ( | ) |
enum classb_error_value |
Class B error values for the global error variable.
Enumerator | |
---|---|
CLASSB_ERROR_NONE |
No error. |
CLASSB_ERROR_WDT |
Watchdog timer error (runtime) |
CLASSB_ERROR_ANALOG |
Analog IO error. |
CLASSB_ERROR_CRC |
CRC error. |
CLASSB_ERROR_FREQ |
Clock frequency error. |
CLASSB_ERROR_INT |
Interrupt monitor error. |
CLASSB_ERROR_CPU |
CPU register error. |
CLASSB_ERROR_SRAM |
SRAM error. |
CLASSB_ERROR_OTHER |
Other error, e.g., detected by application.
|
NO_INIT enum classb_error_value classb_error |
Global error indicator, defined in main.c.
Global error indicator, defined in main.c.
Referenced by classb_wdt_test(), main(), oven_classb_display_error(), oven_classb_run_tests(), and ovenctl_periodic_temperature_sanity_check().