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.

HRPWM中TBPRDHR用法

如果TBPRD=0x0280,TBPRDHR=0x0100,那是等于周期计算最大值是0x010280?

  • Kuntay,

    TBPRDHR表示的是周期寄存器计算值的小数部分。比如PWM计算出来需要周期值为100.5个TBCLK,则TBPRD = 100, 0.5个TBCLK 除以高精度PWM的微步长150ps = xx个计算值,则 TBPRDHR = xx.

    详情请看HRPWM的用户手册。

    Eric

  • 如果要生成的PWM波周期特别长,而TBPRD只有16位,那怎么办?

  • kuntay,

    当周期比较长时,则把PWM的时钟TBCLK变长,通过配置寄存器TBCTL。

    Eric