cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupts and DMA requests on OC2

rich2
Associate II
Posted on May 27, 2009 at 22:11

Interrupts and DMA requests on OC2

1 REPLY 1
rich2
Associate II
Posted on May 17, 2011 at 09:58

I am trying to generate an interrupt (and once that is working, a DMA request) off of OC2 on TIM0. I have started with the example code that came with the IAR EW version 5, ''tim_pwm'' (and I have the STR912 eval board from IAR). This sample code works fine.

I have modified the sample to enable an interrupt on OC1, and this works fine too. The interrupt fires as expected (verified by toggling a pin and using a scope to view it). However, when I switch to OC2 it doesn't work -- no interrupt is generated.

Using the Embedded Workbench debugger I halt the CPU and verified that the OC2IE bit is set, but I'm not getting into the interrupt handler.

Is there something peculiar about OC2 in PWM mode that prevents it from generating an interrupt?

(I am using the STR 91x firmware library.)

Looking ahead, will I be able to generate a DMA request from OC2?

Thanks for any help anyone can provide,

Rich