It is possible to use the tickless mode, you need to provide the same timer interface like the HAL ST driver does. Note that the port can include an user header for this:
Code: Select all
#if CH_CFG_ST_TIMEDELTA > 0
#if PORT_USE_ALT_TIMER == FALSE
#include "chcore_timer.h"
#else /* PORT_USE_ALT_TIMER != FALSE */
#include "chcore_timer_alt.h"
#endif /* PORT_USE_ALT_TIMER != FALSE */
#endif /* CH_CFG_ST_TIMEDELTA > 0 */
Put your implementation in a "chcore_timer_alt.h" and put -DPORT_USE_ALT_TIMER=1 in your Makefile. You can take the implemetation from hal_st_lld.c/.h.
Giovanni