Hello,
I need to use something else than TIM1, 2 or 3 as a SysTick timer, but the timers i have are not supported in hal_st_lld.h . Is there as specific reason why I can't use the other timers on my chip or are they just not implemented?
STM32F303K8 and SysTick timer
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F303K8 and SysTick timer
Hi,
Which version are you using? timers should be all supported now.
You can use SysTick as system timer by putting the "delta" parameter to zero in chconf.h (this disables the tick-less mode), in this case make sure to not exceed 1000Hz as system tick frequency.
Giovanni
Which version are you using? timers should be all supported now.
You can use SysTick as system timer by putting the "delta" parameter to zero in chconf.h (this disables the tick-less mode), in this case make sure to not exceed 1000Hz as system tick frequency.
Giovanni
Re: STM32F303K8 and SysTick timer
I use the 20.3.X branch on the github repo.
The defines STM_ST_USE_TIMX are available for timers 2 to 5, 9 to 14, 21 and 22. On my MCU I have timers 1 to 3, 6, 7 and1 5 to 17, and I already use timers 1 to 3.
Thanks for the fast answer and the tip about tickless mode!
The defines STM_ST_USE_TIMX are available for timers 2 to 5, 9 to 14, 21 and 22. On my MCU I have timers 1 to 3, 6, 7 and1 5 to 17, and I already use timers 1 to 3.
Thanks for the fast answer and the tip about tickless mode!
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F303K8 and SysTick timer
Only timers 2 and 5 are 32 bits wide, which is convenient for tick-less mode. In ticked mode all timers are free to use.
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F303K8 and SysTick timer
Because the driver is not necessarily complete, if I remember well some more timers have been added in repository code.
Giovanni
Giovanni
- FXCoder
- Posts: 384
- Joined: Sun Jun 12, 2016 4:10 am
- Location: Sydney, Australia
- Has thanked: 180 times
- Been thanked: 130 times
Re: STM32F303K8 and SysTick timer
Hi,
As Giovanni noted if you use trunk it has TIM15-17 implemented.
Porting the extra TIM updates back into 20.3.x can be done.
There is also a bug fix needed in 20.3.x for ALARMS handling (wrong indexing of callbacks) which is already fixed in trunk.
--
Bob
As Giovanni noted if you use trunk it has TIM15-17 implemented.
Porting the extra TIM updates back into 20.3.x can be done.
There is also a bug fix needed in 20.3.x for ALARMS handling (wrong indexing of callbacks) which is already fixed in trunk.
--
Bob
- FXCoder
- Posts: 384
- Joined: Sun Jun 12, 2016 4:10 am
- Location: Sydney, Australia
- Has thanked: 180 times
- Been thanked: 130 times
Re: STM32F303K8 and SysTick timer
Hi Giovanni,
Patch for 20.3.x hal_st_lld
1. Include TIM-15-17
2. Update use of STM32_ST_OVERRIDE_ALARMS
For your review - not tested ATM.
--
Bob
Patch for 20.3.x hal_st_lld
1. Include TIM-15-17
2. Update use of STM32_ST_OVERRIDE_ALARMS
For your review - not tested ATM.
--
Bob
- Attachments
-
- 20_3_x_hal_st_lld_patch.zip
- (2.23 KiB) Downloaded 135 times
Who is online
Users browsing this forum: No registered users and 31 guests