STM32 Bootloader
Customizable Bootloader for STM32 microcontrollers
error_handler.c
Go to the documentation of this file.
1 
22 /* Includes ------------------------------------------------------------------*/
23 #include "error_handler.h"
24 
25 #include "delay.h"
26 #include "led.h"
27 #include "mcu_hal.h"
28 
29 #include <stdint.h>
30 
31 /* Functions -----------------------------------------------------------------*/
32 void ErrorHandler(void)
33 {
34  LedGreen1On();
35  DelayMs(250);
36  LedGreen1Off();
37  LedGreen2On();
38  DelayMs(250);
39  LedGreen2Off();
40 }
41 
42 #ifdef USE_FULL_ASSERT
50 // NOLINTNEXTLINE(readability-identifier-naming,readability-non-const-parameter)
51 void assert_failed(uint8_t* file, uint32_t line)
52 {
53  UNUSED(file);
54  UNUSED(line);
55 
56  __disable_irq();
57  for (;;)
58  {
59  }
60 }
61 #endif /* USE_FULL_ASSERT */
62 
This file contains the delay function prototypes.
This file contains the error handling function prototypes.
void ErrorHandler(void)
This function is executed in case of error occurrence.
Definition: error_handler.c:32
void DelayMs(const uint32_t delayMs)
Blocking delay for the specified number of milliseconds.
Definition: delay.c:31
void LedGreen1Off(void)
Turn off the 1st green LED (LD2).
Definition: led.c:38
void LedGreen2On(void)
Turn on the 2nd green LED (LD3).
Definition: led.c:49
void LedGreen2Off(void)
Turn off the 2nd green LED (LD3).
Definition: led.c:55
void LedGreen1On(void)
Turn on the 1st green LED (LD2).
Definition: led.c:32
This file contains the LED driver function prototypes for controlling the green LEDs on the STM32L496...
This file includes the microcontroller-specific HAL header files.