I am trying to use the HAL timers, and the only one that allows me to put in a time value is HalTimerStart, which wants microseconds. When I put in 10000 (for a 10 ms pulse) I get between a 4.7 & 5.3 ms pulse, and when I put on 20000, I still get the same thing. How do you control the timer, and where can I find this documented?
Here is my call to HalTimerConfig:
HalTimerConfig(HAL_TIMER_0, HAL_TIMER_MODE_CTC, HAL_TIMER_CHANNEL_SINGLE,
HAL_TIMER_CH_MODE_OUTPUT_COMPARE, FALSE, PinResetCallback);
Here is my call to HalTimerStart:
HalTimerStart(HAL_TIMER_0, VentRotorMicroSec);
where VentRotorMicroSec is defined as either 10000 or 20000.
TIA,
anw