Generate 30 Mhz Clock and an Interrupt on every nth Clock

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

Moderators: RoccoMarco, lbednarz, tfAteba

Mario
Posts: 7
Joined: Sat Aug 04, 2012 3:08 pm

Re: Generate 30 Mhz Clock and an Interrupt on every nth Cloc

Post by Mario »

Hi Giovanni,

I decided to switch back to your proposed PWM-Method because I could noch use the EXTI as you metioned. And now it works. My fault was a period of 1 which ist not working to generate a clock pulse. I needed to use 2 as minimal period. I now managed to clock in data into the TLC5940 at a rate of 21 Mhz. Any rate above fails. Is there a reason that above 21 MHz the PWM or the used GPT (4096 countdown) will not work above 21 Mhz? Is this because of the ASSERTS I read about? Or is it more simple because I need to transfere 192 Bits to the TLC5940 and there is simply not enough time for that?

Anyhow, Many thanks for the help. I will post the code for a TLC5940 library for ChibiOS if my project is ready.

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

Re: Generate 30 Mhz Clock and an Interrupt on every nth Cloc

Post by Giovanni »

The answer is in the data sheet and reference manual. TIM1 and TIM8 can be clocked up to 84MHz, the other timers are limited to 42MHz because are connected on a slower bus.

ChibiOS/RT abstracts a lot of thing but a careful reading of the RM and DS is still recommended, especially when seeking the maximum performance.

Giovanni
Post Reply