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.
关于昨天的定时器不准的问题现在找到了原因,ConfigCpuTimer(&CpuTimer0, 150,Period);,这是定时器配置函数,当我给Period赋值为常数时,定时正常,赋值const变量时定时也正常,但是如果赋值变量,定时就会有问题,不知道为什么。。例如,令float TT=300(ms),配置定时器ConfigCpuTimer(&CpuTimer0, 150,TT*1000),定时周期不是300ms,而是300*0.35 ms,很奇怪这个函数为什么不能传递变量参数。。
你跟踪函数ConfigCpuTimer(&CpuTimer0, 150,Period)看看他的形参 还设有定义的类型
相关帖子
http://www.deyisupport.com/question_answer/microcontrollers/c2000/f/56/t/10314.aspx