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:N2HET 的延迟

Guru**** 2040210 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/929409/ccs-tms570ls1224-delay-from-n2het

器件型号:TMS570LS1224

工具/软件:Code Composer Studio

大家好、

我想为 N2HET 中的代码创建一个延迟库。

我浏览了参考手册、但它非常复杂。

如果有人可以分享样片或帮助我创建样片、这将是一个很好的帮助。

谢谢你  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Yash、

    您可以使用 ECMP 指令每 xus 生成一次中断、也可以生成脉冲输出、以验证周期性时序。

    例如:

    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}; //在寄存器 A=10时生成中断
    L02 BR{NEX=L00、COND_ADDR=L00、EVENT=NOCOND};

    如果您不需要验证时序、也可以直接从 CNT 指令的计数器溢出条件生成中断。 中断服务例程可以调用所需的函数。 例如、  

    L00 CNT{reg=a、max=1Fh} //当计数器> 0x1f 时生成中断
    L01 BR{NEX=L00、COND_ADDR=L00、EVENT=NOCOND};

    我没有现成的示例可以与您分享。 请参阅 TRM 的 N2HET 一章