This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LS1224: Delay from N2HET

Part Number: TMS570LS1224

Tool/software: Code Composer Studio

Hello Guys,

I want to create a delay library for my code from N2HET.

I went through the Reference Manual but It was quiet complex.

If someone can share sample or can help me to create one, it would be a great help.

Thank You 

  • Hello Yash,

    You can use an ECMP instruction to generate an interrupt every xus, and also generate pulse output just to verify the periodic timing.

    For example:

    L00 CNT { reg=A,irq=OFF,max=20};
    L01 ECMP { hr_lr=HIGH,en_pin_action=ON,pin=1,action=PULSEHI,reg=A,irq=ON,data=10};  //generate interrupt when register A=10
    L02 BR { next=L00, cond_addr=L00, event=NOCOND};

    If you don't need to verify the timing, an interrupt can also be generated directly from the CNT instruction's counter-overflow condition. The interrupt service routine can call the desired function. For example, 

    L00 CNT { reg=A, max=1fh}  //generate interrupt when counter > 0x1f
    L01 BR { next=L00, cond_addr=L00, event=NOCOND};

    I don't have a ready example to share with you. Please refer to the N2HET chapter of TRM