Post History
Got a question about hazardous breakpoints in real-time firmware. Does C have a mechanism which lets me mark a section of code such that breakpoints are somehow ignored or not allowed just in that...
#1: Initial revision
Disabling breakpoints in real-time section of firmware
Got a question about hazardous breakpoints in real-time firmware. Does C have a mechanism which lets me mark a section of code such that breakpoints are somehow ignored or not allowed just in that section? I’ve got an STM32 microcontroller which controls an LED flash. The LED current during the flash is within the LED’s pulse rating, but well above the continuous current rating. There’s a dozen lines of code between beginning of the pulse and the end of the pulse. If somebody (myself most likely) slips and sets a breakpoint when the LED is turned on, and the firmware stops at the breakpoint for one second, then the LED will fry. (No hazard to user. Just damage of the instrument.) I don’t have a safeguard in hardware which would disable the power stage. Perhaps in the next rev of the board I should add a pulse retriggerable one shot which will disable the power stage.