|
TM STM32Fxxx HAL Libraries
v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
|
Delay library for STM32Fxxx devices - http://stm32f4-discovery.com/2015/07/hal-library-3-delay-for-stm32fxxx/. More...
Modules | |
| TM_DELAY_Macros | |
| Library defines. | |
| TM_DELAY_Typedefs | |
| Library Typedefs. | |
| TM_DELAY_Variables | |
| Library variables. | |
| TM_DELAY_Functions | |
| Library Functions. | |
Delay library for STM32Fxxx devices - http://stm32f4-discovery.com/2015/07/hal-library-3-delay-for-stm32fxxx/.
Milliseconds delay range is done using Systick interrupts which are made each 1ms. Interrupt handler Systick_Handler() function can be found in project file stm32fxxx_it.c file which should call HAL_IncTick(). This function is build in HAL drivers, but has weak parameter which means it can be replaced. It is replaced in TM_DELAY library.
Microseconds delay range is done using DWT cycle counter to get maximum possible accuracy in 1us delay range. This delay is not supported on STM32F0xx series, because Cortex-M0 does not have DWT section built-in.
As mentioned in Milliseconds delay section, library has active Systick timer, which makes interrupt every 1 ms. This allows you also, to make software timers, which has resolution of 1 ms. I've added some support functions for software timers.
The main idea of software timers is that when timer reaches zero (timers are down-counters), callback function is called where user can do its work which should be done periodically, or only once if needed. Check TM_DELAY_Timer_Functions group with all functions which can be used for timers.
Version 1.0 - First release
- STM32Fxxx HAL - defines.h