STM32GENERIC icon indicating copy to clipboard operation
STM32GENERIC copied to clipboard

timer library

Open cnc4less opened this issue 8 years ago • 2 comments
trafficstars

will be perfect to have a timer library like the lib-maple one also to run https://github.com/bubulindo/STM32Encoder also have full control on the timers in the chip

cnc4less avatar Jun 18 '17 23:06 cnc4less

On one hand, a simple "I want to run this code every x microseconds" timer would be good. IntervalTimer API is very nice for that. Or even just scheduleRepeated(microseconds, callback). Much simpler than trying to do the same with libmaple HardwareTimer.

On the other hand, a class like HardwareTimer to access more functionality of the chip can be done too.

danieleff avatar Jun 19 '17 16:06 danieleff

A very good starting point could be the timer HAL example which could be directly used for that purpose.

ChrisMicro avatar Jun 20 '17 14:06 ChrisMicro