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.

[参考译文] TIDA-010054:如何计算和实现 HRPWM 周期?

Guru**** 2595770 points


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

https://e2e.ti.com/support/tools/simulation-hardware-system-design-tools-group/sim-hw-system-design/f/simulation-hardware-system-design-tools-forum/1384029/tida-010054-how-is-hrpwm-period-calculated-and-implemeted

器件型号:TIDA-010054

工具与软件:

嗨、团队:  

在以下代码片段(DAB.h)中、为什么"temp"的低8位被屏蔽?

static inline void DAB_calculatePWMDutyPeriodPhaseShiftTicks(void)
{
    uint32_t temp;
    //
    // Calculation for the period is done in high resolution
    // as it is used by the phase shift variable in high resolution
    //
    temp = ((uint32_t)(((float32_t)(DAB_pwmPeriod_pu *
            DAB_pwmPeriodMax_ticks) *
            (float32_t)65536.0)))>> 1;

    DAB_pwmPeriod_ticks = temp & 0xFFFFFF00;

'DAB_pwmPeriod_ticks'然后被写入'TBPRDHR'(我在任何地方找不到'TBPRD'寄存器被更新)、您能解释为什么周期节拍数不像技术手册中描述的那样被分成'TBPRD"和'TBPRDHR'吗?  

非常感谢有关如何计算 HR 节拍的更多详细信息!  

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

    您好!

    感谢您的咨询/
    因为没有使用低位、所以这个低位被屏蔽、根据 TMSF280039C 的技术参考手册(第 2401页和 2402页)应该为0
    "这个寄存器中的低8位被忽略-写入被忽略并且读取返回0 "

    DAB_pwmPeriod_ticks 是一个32位整数。 寄存器是16位、且 TBPRD 是 TBPRDHR 的下一个较高寄存器、因此此命令实际上会写入两个寄存器。

    请参阅 TMS329F280039C 的技术参考手册: https://www.ti.com/lit/ug/spruiw9c/spruiw9c.pdf
    在 2311页的第20.15章中、有非常详细的 HRPWM 模块的 eplain。

    此致、

    Andreas