File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -918,8 +918,8 @@ forever and never return. Because it caches (optimises) the value of `s_ticks`
918918in a register and never updates it. A compiler does that because it doesn' t
919919know that ` s_ticks` can be updated elsewhere - by the interrupt handler! The
920920generated code with ` volatile` , on the other hand, loads ` s_ticks` value on
921- each iteration. So, the rule of thumb: those values in memory that get updated
922- by interrupt handlers, or by the hardware, declare as ` volatile` .
921+ each iteration. So, the rule of thumb: ** those values in memory that get updated
922+ by interrupt handlers, or by the hardware, declare as ` volatile` ** .
923923
924924Now we should add ` SysTick_Handler()` interrupt handler to the vector table:
925925
You can’t perform that action at this time.
0 commit comments