If PULSECOUNT is enabled, current logic in stm32_pwm.c assumes that all PWM
instances support PULSECOUNT which is not true. Timers without RCR register
shouldn't use pwm_pulsecount_* functions. Probably that is the problem.
I guess you can do something like this:
https://github.com/raiden00pl/incu
I Tried to show the difference (debug) in one image
https://imgshare.io/image/image.p307iH
I tried to state the differences... according the reference sheets and
application notes from the STM32F4xx family this should work "together"
where you use say TIM1 (or TIM8) [ADVANCED TIMERS] w