This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PWM as multi purpose timer using HET - Interrupts are not firing



Hi folks,

i was running out of rti timers, so i decided to use the pwm section of the HET module on my RM48L952PGE. I've enabled the het1 driver, enabled interrupt channel 10 and 24 and enabled the interrupt for Eof Period 7. But -surprise- no interrupt is fired. So, what am i doing wrong?


The project is attached....

Cheers

Jan

Code:

main.h

signal.duty = 50;
signal.period = 1000;
	
hetInit();
_enable_interrupt_();
pwmEnableNotification(hetREG1,pwm7,pwmEND_OF_PERIOD);

pwmSetSignal(hetRAM1,pwm7,signal);
pwmStart(hetRAM1,pwm7);
while();

7673.het_blinky.zip

  • You are running VCLK2 too slow for the loop resolution you set. (You have GCLK=20MHz, VCLK2=10MHz) I changed the PLL output from 20MHz to 200MHz and it seems to work. The hint is that the "PRGM OVERFL FLAG" was set in the N2HET Exception Control Register 2.