Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: AM335x DMTimer Enable/Disable is very slow (~60 us)

$
0
0

I figured out what is wrong. I have been using a 32 kHz (32768 Hz) clock for my timers. The period for this clock is ~30 us. Apparently it takes a couple of clock cycles to start or stop the timer. Therefore, it took 2 x ~30 us = ~60 us. That explains why starting or stopping the timer took so long.

I solved this problem by switching the timer clock sources to 24 MHz (CLK_M_OSC). This much faster clock has a period of a few 10s of nanoseconds, so the clock cycles or "ticks" are much faster. Therefore, the couple of clock cycles it takes to start or stop the timer are in the 100s of nanoseconds. This is a dramatic improvement over 60 us!

So if you want to stop/start the timer quickly, you must use a high-frequency clock (i.e., CLK_M_OSC) for that timer.


Viewing all articles
Browse latest Browse all 25965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>