Other Parts Discussed in Thread: HALCOGEN
Hello TI-Support
I would like to configure two pwm signals.
pwm1: period 10'000 us
pwm2: period 2'000 us
I would then like to enable pwm notification for both signals, however so far only notifications for pwm1 are received but none for pwm2.
Here is my code:
int main(void)
{
_enable_IRQ();
_pmuInit_();
_pmuEnableCountersGlobal_();
GlobalTestCounter1 = 0;
GlobalTestCounter2 = 0;
hetSIGNAL_t PWMSignal;
/*Initialise the HET1 timer signal pwm1 */
PWMSignal.duty = 50; //Set PWM duty cycle in %
PWMSignal.period = 10000; //Set PWM period in us
pwmSetSignal(hetRAM1, pwm1, PWMSignal); //set the PWM duty-cylce and period
/*Initialise the HET1 timer signal pwm2 */
PWMSignal.duty = 50; //Set PWM duty cycle in %
PWMSignal.period = 2000; //Set PWM period in us
pwmSetSignal(hetRAM1, pwm2, PWMSignal); //set the PWM duty-cylce and period
/*initialise the HET1 timer module */
hetInit();
pwmStart(hetRAM1,pwm1);//enable the pwm signal, which triggers the adc conversion
pwmEnableNotification(hetREG1,pwm1, pwmEND_OF_PERIOD); /* enable the pwm1 end of period notification */
pwmStart(hetRAM1,pwm2);//enable the pwm signal, which triggers the adc conversion
pwmEnableNotification(hetREG1,pwm2, pwmEND_OF_PERIOD); /* enable the pwm1 end of period notification */
while(1)
{
}
}
void pwmNotification(hetBASE_t * hetREG,uint32 pwm, uint32 notification)
{
/*verify notification source */
if(pwm == pwm1)
{
GlobalTestCounter1++;
}
/*verify notification source */
if(pwm == pwm2)
{
GlobalTestCounter2++;
}
return;
}
In HalCoGen I configured pwm1 and pwm2 in the same way. Since I do get pwm notifications for pwm1 I guess the HalCoGen configuration is fine.
What am I doing wrong here?


