Hi,
Base on Application Report SPNA097, I'am try to porting this program to RM48 which using N2HET.
My SCI TX code is here:
TX1_PIN .equ 0 ; HET0 is used for UART1 TX
RX1_PIN .equ 2 ; HET1 is used for UART1 RX
BIT_PRD .equ 162 ; 1 bit period [LRCLK] less 1
BIT_PRD_1_5 .equ 241 ; 1.5 bit period [LRCLK] less 1
BITS2RX .equ 8 ; Rec 8+1 bits after start bit
TX1_START MOV32 { next=TX1_IFST, remote=TX1_Shift, type=REMTOREG, reg=A};
TX1_IFST MCMP { next=TX1_INPUT, cond_addr=TX1_PrdCtr, en_pin_action=OFF, pin=TX1_PIN, action=SET, order=REG_GE_DATA, reg=A, data=1, hr_data=0 }
TX1_PrdCtr DJZ { next=TX1_End, cond_addr=TX1_BitCtr, irq=OFF, data=0 }
TX1_BitCtr DJZ { next=TX1_Shift, cond_addr=TX1_INPUT, reqnum=0, request=GENREQ, reg=NONE, irq=ON, data=0 }
TX1_Shift SHFT { next=TX1_Reload, smode=OR0, cond_addr=TX1_Reload, cond=UNC, pin=TX1_PIN, reg=NONE, irq=OFF, data=0 }
TX1_Reload MOV32 { next=TX1_End, remote=TX1_PrdCtr, type=IMTOREG&REM, reg=NONE, data=BIT_PRD }
TX1_INPUT MOV32 { next=TX1_InChk, remote=TX1_Shift, control=ON, type=IMTOREG&REM, reg=A, data=852 }
TX1_InChk ECMP { next=TX1_BitRld, cond_addr=TX1_End, pin=TX1_PIN, reg=A, data=0 }
TX1_BitRld MOV32 { next=TX1_PrdCtr, remote=TX1_BitCtr, type=IMTOREG&REM, reg=NONE, data=10 }
TX1_End BR { next=TX1_Start, cond_addr=TX1_Start, event=NOCOND, irq=OFF }
Once I have successfully run this program is HET IDE and the result as expected. But it can not work while I loaded the code to real RM48 chip.
Would you please to check this program and give me some advice. Thanks!