add bluepill exception: don't blink LED which influences the RTC

This commit is contained in:
King Kévin 2017-04-03 13:14:58 +02:00
parent 5e55f572f3
commit 6531aac77b
1 changed files with 2 additions and 0 deletions

2
main.c
View File

@ -231,7 +231,9 @@ void main(void)
}
while (rtc_internal_tick_flag) { // the internal RTC ticked
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)
#endif
ticks_time = rtc_get_counter_val(); // copy time from internal RTC for processing
action = true; // action has been performed
if ((ticks_time%(60))==0) { // one minute passed