[FR] [FT Motion] Add native timer frequency to HAL
Is your feature request related to a problem? Please describe.
Desire to have the cleanest pulse trains in the FT_MOTION ISR
Are you looking for hardware support?
all boards supporting FT_MOTION would benefit from this.
Describe the feature you want
For the cleanest pulse trains with FT Motion, it is best to set the timer frequency to the closest value close to 64MHz that can be achieved by using the native timer frequency divided by a carefully chosen prescaler value.
It would be great if the HAL would include this value so we spare end users guessing this value and being able to automatically configure this timer frequency for ideal pulse trains if FT_MOTION is used.
Additional context
No response
[deleted wrong equation, will write down later]
But we need to confirm the classic motion system still works, and likely find a compile time alternative.
The easiest way would be to put it in board config files and have timers.h only define it if the board files didn't. For stm32h7 it would be 55MHz. Perfect pulse trains
I think more appropriate place for changing this will be HAL, because setting depends on MCU, not board. And if env uses variant with different clocking configuration then it can be handled there as well, instead of spamming all board pins files with setting that will be same anyway for all boards with same MCU. It can be made overrideable if needed, of course.
I agree, the thing is that the same hal applies to many MCUs in the stm32 case, all would need to be handled correctly from the get go
Updated description accordingly