I do not need super high accuracy. + - 1-3 minutes a day - for me it is permissible.
I was just stuck with choosing a timing source. I need an interrupt every second. The
RTClock library has such a function, but does not work on the kernel from
STMicroelectronycs. The
STM32RTC library runs on this core, but does not have the necessary function. An example using a timer interrupt causes a lot of errors:
https://github.com/stm32duino/STM32Exam ... llback.ino
Code: Select all
Blink:45:26: error: invalid conversion from 'void (*)()' to 'void (*)(HardwareTimer*)' [-fpermissive]
45 | MyTim->attachInterrupt(Update_IT_callback);
| ^~~~~~~~~~~~~~~~~~
| |
| void (*)()
In file included from C:\Users\�����\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/stm32/analog.h:45,
from C:\Users\�����\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/board.h:8,
from C:\Users\�����\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/wiring.h:41,
from C:\Users\�����\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/Arduino.h:32,
from sketch\Blink.ino.cpp:1:
C:\Users\�����\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/HardwareTimer.h:129:33: note: initializing argument 1 of 'void HardwareTimer::attachInterrupt(void (*)(HardwareTimer*))'
129 | void attachInterrupt(void (*handler)(HardwareTimer *)); // Attach interrupt callback which will be called upon update event (timer rollover)
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
invalid conversion from 'void (*)()' to 'void (*)(HardwareTimer*)' [-fpermissive]
Blink:2:2: error: #error "Due to API change, this sketch is compatible with STM32_CORE_VERSION >= 0x01090000"
2 | #error "Due to API change, this sketch is compatible with STM32_CORE_VERSION >= 0x01090000"
| ^~~~~
exit status 1
#error "Due to API change, this sketch is compatible with STM32_CORE_VERSION >= 0x01090000"