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.

28377,TZFLG

我想使用EPwm8Regs.TZFRC.bit.OST = 1来触发TZ

然后使用EPwm8Regs.TZCLR.bit.OST = 1来清除

但是我发现,使用EPwm8Regs.TZFLG.bit.OST作为标志位来判断行不通

TZCLR不能清除该标志

请问还有没有对应的标志位可以使用TZCLR来清除

  • 您可以看一下用户指南中的描述

    15.9.2 Operational Highlights for the Trip-Zone Submodule

    The one-shot trip condition must be cleared manually by writing to the TZCLR[OST] bit. If desired, TZOSTFLG register bit should be cleared by manually writing to the corresponding bit in the TZOSTCLR register.

  • 这一段我看过了,我用EPwm8Regs.TZCLR.bit.OST不能清除EPwm8Regs.TZFLG.bit.OST

    如果使用TZOSTFLG,我就不知道这么对应这里的OST1~6

  • TZOSTFLG寄存器是一个只读的寄存器

    在用户手册中,我们没有说明关于TZFLG和TZOSTFLG哪一个来进行首先设置引起的区别。一般我们会先清除TZOSTFLG,然后再清除TZFLG。

    因为您可以通过TZFLG查看是否有中断,然后使用TZOSTFLG查看是由哪一个oneshot引起的中断,而后清除引起该中断的特定OST,然后清除TZFLG