I have a project where I'm already using TIM{2, 3, 4, 5} to generate external PWM signals and the part I use (STM32F446) doesn't have TIM21 and TIM22. It seems like these are the only timers available to be used as free running timers.
I modified st_lld.c / st_lld.h to also support TIM7, which is a basic control timer that doesn't have external outputs and can be used for the DAC. I did some initial tests and it seems to be working normally. This makes me wonder why TIM6 and TIM7 is not officially supported to be used as free running timer, are there any downsides to use this timer instead of e.g TIM3?
Use TIM7 for ChibiOS free running 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: Use TIM7 for ChibiOS free running timer?
Hi,
TIM6 and TIM7 do not have the comparator register used by the ST driver code.
Giovanni
TIM6 and TIM7 do not have the comparator register used by the ST driver code.
Giovanni
-
- Posts: 2
- Joined: Tue Feb 21, 2017 5:03 pm
Re: Use TIM7 for ChibiOS free running timer?
Thanks! I will figure out a way to use one of the other timers then.
Who is online
Users browsing this forum: No registered users and 19 guests