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.

[参考译文] TM4C129XNCZAD:TM4C129XNCZAD 系统控制延迟

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1214406/tm4c129xnczad-tm4c129xnczad-system-control-delay

器件型号:TM4C129XNCZAD

尊敬的先生:

我们使用的是 TM4C129XCNZAD、需要控制延迟1、5、10秒


uint32_t ui32ClockMS;

//以120 MHz 从 PLL 运行。
ui32SysClock = SysCtlClockFreqSet ((SYSCTL_XTAL_25MHz |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480)、120000000);

SysCtlPWMClockSet (SYSCTL_PWMDIV_1);

//配置设备引脚。
PinoutSet();

//初始化显示驱动程序。
Kentec320x240x16_SSD2119Init (ui32SysClock);
GrContextInit (&sContext_Label、&g_sKentec320x240x16_SSD2119);//LCD 初始化



ui32ClockMS /= 3;
SysCtlDelay (10*ui32ClockMS);// 10秒延迟

10秒延迟的上述情况是否正确?

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

    您好!

     SysCtlDelay ()函数执行需要3个 CPU 周期。 因此、要创建10s 延迟、您需要按如下所示除以3。  

    SysCtlDelay (10*ui32ClockMS / 3);// 10秒延迟