Skip to content

Comments

Flash saving: SysTick migration#2

Merged
dacarson merged 5 commits intomainfrom
FlashSaving-SysTick_Migration
Feb 20, 2026
Merged

Flash saving: SysTick migration#2
dacarson merged 5 commits intomainfrom
FlashSaving-SysTick_Migration

Conversation

@dacarson
Copy link
Owner

The code uses a custom timer to manage time based events, however, the built in SysTick timer could be used. Moving to that timer will save Flash that is used to configure and use the custom timer.

The code uses a custom timer for all timer functions, however, there is a built in SysTick timer that could be used. By moving over the built in timer, we can save some Flash that is used for setup and management of the custom timer.
Record current sizes. No code changes. Reviewed and it is correct.
Implemented Phase 2, performed a code review, and a clean compile. Unable to test as HW not available.
Implemented Phase 3, code reviewed and compiled. Can't test as HW not available.
Implemented the documentation changes and archived the migration spec.
@dacarson
Copy link
Owner Author

Migrate 10 ms scheduler from TIM1 to SysTick (reduce flash)

  • Use SysTick (1 ms) with /10 to drive the 10 ms scheduler; TIM1 removed.
  • Scheduler_ISR_Tick10ms() in SysTick_Handler; main loop and LL_mDelay() unchanged.
  • Flash: ~76 bytes .text, ~116 bytes total program (Phase 1 baseline vs Phase 3).
  • Docs: behavior spec and code comments updated; migration plan archived.

@dacarson dacarson merged commit 9047beb into main Feb 20, 2026
@dacarson dacarson deleted the FlashSaving-SysTick_Migration branch February 20, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant