Class B application error insertion.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
void | oven_classb_display_error (void) |
Print error message depending on the value of classb_error. More... | |
void | oven_classb_error_insertion (void) |
Show menu for error insertion and handle user's selection. More... | |
void | oven_classb_init_tests (void) |
Initialize Class B tests. More... | |
void | oven_classb_run_tests (void) |
Run all Class B tests. More... | |
void oven_classb_display_error | ( | void | ) |
Print error message depending on the value of classb_error.
References classb_error, CLASSB_ERROR_ANALOG, CLASSB_ERROR_CPU, CLASSB_ERROR_CRC, CLASSB_ERROR_FREQ, CLASSB_ERROR_INT, classb_error_messages, CLASSB_ERROR_NONE, CLASSB_ERROR_OTHER, CLASSB_ERROR_SRAM, CLASSB_ERROR_WDT, ERR_AIO, ERR_CPU, ERR_CRC, ERR_FRQ, ERR_INT, ERR_NONE, ERR_OTHER, ERR_SRAM, ERR_TMP, ERR_WDT, gfx_mono_draw_filled_rect, gfx_mono_draw_string(), GFX_PIXEL_CLR, and sysfont.
Referenced by main().
void oven_classb_error_insertion | ( | void | ) |
Show menu for error insertion and handle user's selection.
This function changes device configurations and does some hacks to make the device behave incorrectly.
The menu entries are
References ADC_CH0, adc_foul_callback(), adc_set_callback(), adcch_enable_interrupt(), adcch_read_configuration(), adcch_write_configuration(), GFX_MONO_MENU_EVENT_EXIT, GFX_MONO_MENU_EVENT_IDLE, gfx_mono_menu_init(), gfx_mono_menu_process_key(), keyboard_get_key_state(), KEYBOARD_RELEASE, keyboard_event::keycode, oven_classb_flash_corrupter(), OVEN_PERIODIC_TEMPTEST_TC, oven_wdt_periodic_reset, sysclk_set_prescalers(), keyboard_event::type, and variable_for_sram_error.
Referenced by main().
void oven_classb_init_tests | ( | void | ) |
Initialize Class B tests.
Set up timers, timer callbacks, initialize interrupt monitor, add interrupts to be monitored.
References classb_freq_setup_timer(), classb_freq_tc_callback(), CLASSB_FREQTEST_TC, classb_intmon_reg_int(), classb_rtc_callback(), CLASSB_RTC_INT_PERIOD, PER_CLASSB_TESTS, RTC32, rtc_set_alarm_relative(), rtc_set_callback(), tc_enable(), tc_set_overflow_interrupt_callback(), and TEMP_SANITY_TEST.
Referenced by main().
void oven_classb_run_tests | ( | void | ) |
Run all Class B tests.
Destructively test ADC and DAC; modules must be reinitialized for application use. Then test the SRAM, CPU registers and CRC of Flash (if enabled).
References adc_enable(), classb_analog_io_test(), classb_error, CLASSB_ERROR_NONE, CLASSB_NSECS, classb_register_test(), classb_sram_test(), dac_enable(), oven_ui_set_status_leds(), S_GREEN, S_ORANGE, and S_RED.
Referenced by ovenctl_turn_on_plate().