lm3s811例程中的是这样写的延时voidDelay(unsigned long ulSeconds){ // // Loop while there are more seconds to wait. // while(ulSeconds--) { // // Wait until the SysTick value is less than 1000. // while(SysTickValueGet() > 1000) { }
// // Wait until the SysTick value is greater than 1000. // while(SysTickValueGet() < 1000) { } }}为什么要这样写呢,延时的时间是 怎么计算的?程序里有下面这一句SysTickPeriodSet(SysCtlClockGet());那么SysTick的频率是不是跟板上使用的晶振频率一致啊。
[
本帖最后由 leekuip 于 2012-2-21 13:13 编辑 ]
此帖出自
小平头技术问答
SysTick值是循环自减的,范围为0到你设置的波特率-1之间。
[ 本帖最后由 shower.xu 于 2012-2-20 23:14 编辑 ]
一周热门 更多>