Correct version of EEPROM header for settings and write check for overtemperature
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include <helper-macros/helper-macros.h>
|
||||
#include <stm-periph/rcc-manager.h>
|
||||
#include <reflow-controller/temp-converter.h>
|
||||
#include <reflow-controller/adc-meas.h>
|
||||
|
||||
/**
|
||||
* @brief Macro that checks if a given @ref error_flag is persistent
|
||||
@@ -563,6 +564,7 @@ static void safety_controller_process_active_timing_mons()
|
||||
/**
|
||||
* @brief safety_controller_process_monitor_checks
|
||||
* Process the analog and timing monitors and set the relevant flags in case of a monitor outside its limits.
|
||||
* Furthermore, the PT1000 resistance is checked for overtemperature
|
||||
*
|
||||
* The checking of the analog monitors will only be armed after a startup delay of 1000 ms to allow the values to stabilize.
|
||||
*/
|
||||
@@ -572,6 +574,7 @@ static void safety_controller_process_monitor_checks(void)
|
||||
struct analog_monitor_info amon_info;
|
||||
uint32_t idx;
|
||||
uint32_t analog_mon_count;
|
||||
float pt1000_val = 1000000.0f;
|
||||
|
||||
if (!startup_completed && systick_get_global_tick() >= 1000)
|
||||
startup_completed = true;
|
||||
@@ -589,6 +592,11 @@ static void safety_controller_process_monitor_checks(void)
|
||||
}
|
||||
}
|
||||
|
||||
adc_pt1000_get_current_resistance(&pt1000_val);
|
||||
if (pt1000_val > safety_controller_overtemp_config.overtemp_equiv_resistance) {
|
||||
safety_controller_report_error(ERR_FLAG_OVERTEMP);
|
||||
}
|
||||
|
||||
safety_controller_process_active_timing_mons();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user