add bluepill exception: don't blink LED which influences the RTC
This commit is contained in:
parent
5e55f572f3
commit
6531aac77b
2
main.c
2
main.c
|
@ -231,7 +231,9 @@ void main(void)
|
||||||
}
|
}
|
||||||
while (rtc_internal_tick_flag) { // the internal RTC ticked
|
while (rtc_internal_tick_flag) { // the internal RTC ticked
|
||||||
rtc_internal_tick_flag = false; // reset flag
|
rtc_internal_tick_flag = false; // reset flag
|
||||||
|
#if !defined(BLUE_PILL) // on the blue pill the LED is close to the 32.768 kHz oscillator and heavily influences it
|
||||||
led_toggle(); // toggle LED (good to indicate if main function is stuck)
|
led_toggle(); // toggle LED (good to indicate if main function is stuck)
|
||||||
|
#endif
|
||||||
ticks_time = rtc_get_counter_val(); // copy time from internal RTC for processing
|
ticks_time = rtc_get_counter_val(); // copy time from internal RTC for processing
|
||||||
action = true; // action has been performed
|
action = true; // action has been performed
|
||||||
if ((ticks_time%(60))==0) { // one minute passed
|
if ((ticks_time%(60))==0) { // one minute passed
|
||||||
|
|
Loading…
Reference in New Issue