I could be missing something obvious here but I have been testing the NHET on the RM48L950PGE. I have set up PWM0 on NHET01[04] and loaded a simple routine that allows me to modify the duty cycle and period.
As you can see below the waveform for duty cycle 50% and period of 1 second (1000000usecs) looks correct.
If I try to change this to a period of 2 seconds (0.5Hz) the duty cycle becomes 25% as opposed to longer 50% pulse:
Here is the code, I vary pwm0_signal elements in the debug window to change the waveform
void main(void) { /* USER CODE BEGIN (3) */ hetInit(); pwm0_enb = false; pwm0_signal.duty = 50; pwm0_signal.period = 1000; /*in usecs*/ while(1) { if(pwm0_enb) { /*pwmSetDuty(hetRAM1,pwm0,pwm0_duty);*/ pwmSetSignal(hetRAM1,pwm0,pwm0_signal); pwmStart(hetRAM1,pwm0); } else { pwmStop(hetRAM1,pwm0); } /* Forever */ } /* USER CODE END */ }