I am still stuck on this.
Basically I am trying to user TIM5 to count up in increments of 1 us.
Here is the code I am trying to get to work.
I am calling "delay_init" from the Application_ini handler, but when I look at Timer5 in Ride7 it always stays at 0, none of the registers seem to be set, and it does not seem to count at all.
And when the code hits the "delay_us(1)" line, it just goes into an infinite loop, since the timer does not count.
I tried also with TIM4, which just caused the LCD display to flicker VERY fast, using TIM6 just hangs on the line calling "TIM_TimeBaseInit" ...
So somewhere there I am doing something wrong...
I am not using any interrupts, so do I need to do any NVIC initialization or something else to get the TIMER running?
Last edited by mikepo (2011-01-10 05:32:10)