I have a custom function written in HET IDE to generate a PWM. I want to start the PWM after a delay of 1 second. This is only done once in the beginning of the program. I tried to have a CNT{} followed by DJZ{} run for 1 second and then generate the PWM, but the program does not run as required. On HET IDE simulation, the code runs fine.But while testing it on the board, the PWM does not get generated at all and the delay function is stuck. Request you to tel me what I am doing wrong here:
This is the code:
L00 CNT {reg=A,max=1562499, irq=ON}
L01 DJZ {cond_addr=L02,reg=A,data=0}
L02 CNT {reg=B, max=1561, data=0}
L03 ECMP{next=L04, hr_lr=HIGH,en_pin_action=ON,pin=5,action=PULSELO,reg=B,data=781,hr_data=0}
L04 BR {next=L02, cond_addr=L02, event=NOCOND}