Set up fast (DMTimer-) Interrupt on BeagleBone Black

2.6k views Asked by At

I try to do some bare-metal programming on Beaglebone Black using StarterWare. All modifications to run with the Black are already done and I'm running the DMTimer-example which works well.

In next step I have changed this example, the ISR just toggles a GPIO (which should need some dozens of clock cycles only). And I changed the timer and timer reload count of the example to 0xFFFFFF0F which is equal to 10 usec period - so my ISR should be called every 10 usec.

Amazingly this seems o be the limit, when I use bigger timer values which should result in more frequent calls of ISR it still stays at these 10 usec, even 5 usec are not possible with the DMTimer-example. As timer clock source CLK_M_OSC is already used so this shouldn be fine.

So...any idea how ISR can be called faster?

1

There are 1 answers

0
DavidB On BEST ANSWER

Have you tried adjusting (or disabling) the timer prescaler? I found that the DMTimer example uses the prescaler and I didn't get the behaviour that it suggested (interrupts every 700ms) until I added the line

DMTimerPreScalerClkDisable(SOC_DMTIMER_2_REGS);

After that, it appeared to work correctly.

With the prescaler disabled, you should get 10ms with a reload counter of 0xFFFFFF06 or 5ms with a reload counter of 0xFFFFFF83.