Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Inc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
#define TEMP_WARNING 600 // annoying fast beeps [°C * 10]. Here 60.0 °C
#define TEMP_POWEROFF_ENABLE 0 // to poweroff or not to poweroff, 1 or 0, DO NOT ACTIVITE WITHOUT CALIBRATION!
#define TEMP_POWEROFF 650 // overheat poweroff. (while not driving) [°C * 10]. Here 65.0 °C

// ############################### STARTUP DELAY ################################
#define STARTUP_DELAY_MS 500 // startup delay [ms] before power latch is activated. Prevents spurious power-on from brief supply glitches (e.g. UART back-powering).
// ######################## END OF TEMPERATURE ###############################


Expand Down
2 changes: 2 additions & 0 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ int main(void) {

SystemClock_Config();

HAL_Delay(STARTUP_DELAY_MS); // Wait to prevent spurious power-on when MCU is briefly back-powered (e.g. via UART). If the supply disappears, the MCU will simply lose power and not latch on.

__HAL_RCC_DMA1_CLK_DISABLE();
MX_GPIO_Init();
MX_TIM_Init();
Expand Down
Loading