hal question : how to use timer over 8 [9-14] for pwm

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

hal question : how to use timer over 8 [9-14] for pwm

Post by alex31 »

Hello.

After successful tests with chibios on a a stm32f4-discovery, i have ordered an olimex stm43-p407
for ethernet and lcd module, which is, tanks to chibios team, described in the boards directory.

I use on the discovery version of my program 5 pwm out which need tim3 and tim4.
unfortunately, on the p407 board, few gpio are free to use, and they all are on port E,F,G.

according to stmicro documentation, to be able to output pwm on F and G port, i should use TIM9,10,11,13, how to do that ?
TIM declaration in mcuconf.h seems to stop a TIM8.

thanks
Alexandre
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: hal question : how to use timer over 8 [9-14] for pwm

Post by Giovanni »

Those extra timers are not currently supported, you may try to extend the PWM driver yourself or use them directly.

The problem you will face is that "they" had the brilliant idea to share the IRQ of those timers with the IRQ of TIM1 and TIM8. If you don't need callbacks then you can ignore this issue.

Giovanni
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: hal question : how to use timer over 8 [9-14] for pwm

Post by alex31 »

Thanks for the answer.

I have been the easy way, and have disconnected camera, can and mco to be able to use pwm on low range timer.

I have another question about chibios and p407, but will ask in the p407 thread.

Alexandre
Post Reply