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.

[参考译文] TMS320F28377S:观察到 timer0 ISR 的3usec 变化

Guru**** 2439050 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1052219/tms320f28377s-observed-3usec-variation-in-timer0-isr

器件型号:TMS320F28377S

尊敬的所有人:

在我们的系统中、我们有10MHz 外部振荡器

SYSCLKOUT 配置为50MHz。 我们观察到@ SYSCLKOUT  GPIO= 49.1至51MHz

 µs 生成100 μ s 的定时器0:

#define SYSCLK 50000000

#define TIMER_CLK 1000000

#define TIMER_TIME 100

TimerInit ()

      uint8 timer_prescal;

      CpuTimer0Regs.TCR.bit.TSS  = 1;

      Timer_prescal              = SYSCLK/TIMER_CLK

      CpuTimer0Regs.TPR.bit.TDDR =定时器_prescal;

      CpuTimer0Regs.tcr.bit.tie  = 1;

      CpuTimer0Regs.TCR.bit.FREE = 1;

      SetTimer (timer_time);     

      CpuTimer0Regs.TCR.bit.TSS  = 0;

 

置位定时器(UINT32时间)

      uint32 tmr_prd;

      TMR_PRd =时间;

      

      TMR_PRd =(TIMER_CLK/1000000)*时间;    

      CpuTimer0Regs.PRD.bit.lsw = tmr_prd & 0xFFFF;

      CpuTimer0Regs.PRD.bit.MSW = tmr_prd >> 16;    

对于所需的100微秒中断、我们观察 到中断以103微秒的速率触发。

观察的可能原因是什么?如何克服这种情况?

此致...

Yogesh