apache / mynewt-core

An OS to build, deploy and securely manage billions of devices
https://mynewt.apache.org/
Apache License 2.0
825 stars 369 forks source link

hw/mcu/stm32f1: Disable SysTick when RTC is selected as tick source #3248

Closed kasjer closed 3 months ago

kasjer commented 3 months ago

When tick was provided by RTC instead of SysTick (default) and MCUboot used SysTick during boot, SysTick was never turned off and was running in application code. This resulted in two interrupts advancing mynewt OS tick so clock was running too fast.

Now os_tick_init() from RTC code disables SysTick that could be started in bootloader