Tool/software:
I'm trying to generate PWM Signal on 2Pins but 2nd pin request im unable to generate In one pin i made but another pin not generating using HTURAM. het code mentioned below.
PWM_PERIOD .equ 4
PWM_PIN_NUM1 .equ 9 ; First PWM pin number
PWM_PIN_NUM2 .equ 10 ; Second PWM pin number
INIT_COMPARE1 .equ 2 ; Initial compare value for the first pin
INIT_COMPARE2 .equ 3 ; Initial compare value for the second pin
INIT_HR_DELAY .equ 120
; Counter instruction for generating the virtual counter
L00 CNT { reqnum=0,request=GENREQ,reg=A,irq=OFF,max=PWM_PERIOD};
; ECMP setup for the first PWM pin
L01 ECMP { next=L04,hr_lr=HIGH,en_pin_action=ON,cond_addr=L02,pin=PWM_PIN_NUM1,action=PULSELO,reg=A,irq=OFF,data=INIT_COMPARE1,hr_data=INIT_HR_DELAY};
; MOV32 instruction for the first pin
L02 MOV32 { remote=L01,type=IMTOREG&REM,reg=NONE,data=INIT_COMPARE1,hr_data=INIT_HR_DELAY};
; ECMP setup for the second PWM pin
L03 ECMP { next=L06,hr_lr=HIGH,en_pin_action=ON,cond_addr=L05,pin=PWM_PIN_NUM2,action=PULSELO,reg=A,irq=OFF,data=INIT_COMPARE2,hr_data=INIT_HR_DELAY};
; MOV32 instruction for the second pin
L04 MOV32 { remote=L03,type=IMTOREG&REM,reg=NONE,data=INIT_COMPARE2,hr_data=INIT_HR_DELAY};
; Branch to the next instruction
L05 BR { next=L00,cond_addr=L00,event=NOCOND};
; Branch back to the beginning of the PWM setup
L06 BR { next=L03,cond_addr=L03,event=NOCOND};