Commit 4e4a678
Fix first system tick delay on Cortex-M0
The SysTick timer was initializing incorrectly, causing an unexpectedly
long first system tick. When the 24-bit SysTick Current Value Register
starts at 0xFFFFFF without being reset, it creates a substantial startup
delay of approximately 350 milliseconds at 48 MHz.
The initialization in the port file is corrected to reset the register,
ensuring more predictable and efficient system tick timing. This change
aligns with Arm's recommended initialization practices for the SysTick
timer.
Signed-off-by: Jim Huang <jserv@ccns.ncku.edu.tw>1 parent 2b5c15e commit 4e4a678
4 files changed
Lines changed: 12 additions & 0 deletions
File tree
- ports/cortex_m0
- ac5/example_build
- gnu/example_build
- iar/example_build
- keil/example_build
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
0 commit comments