This is a demo that uses the System Tick counter in the STM32F4
as a way of creating accurately timed delays. A simple 'msleep' is implemented by watching the system clock to wait a certain number of milleseconds before it returns. Its a bit more accurate than a for loop, although it really shines when your running multiple threads.
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
314ad2d877
commit
3673e4059b
8
examples/stm32/f4/stm32f4-discovery/tick_blink/README
Normal file
8
examples/stm32/f4/stm32f4-discovery/tick_blink/README
Normal file
@@ -0,0 +1,8 @@
|
||||
README
|
||||
------
|
||||
|
||||
This example is the same as fancy_blink except that it uses the
|
||||
systick timer to generate time accurate delays. Shows how to set
|
||||
up the systick timer to create an interrupt every millisecond and
|
||||
how to write a delay routine (msleep) that can then delay for a
|
||||
specific number of milliseconds.
|
||||
Reference in New Issue
Block a user