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.

[参考译文] CCS/TM4C1294NCPDT:TM4C1294NCPDT

Guru**** 2613915 points
Other Parts Discussed in Thread: TM4C1294NCPDT

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/773157/ccs-tm4c1294ncpdt-tm4c1294ncpdt

器件型号:TM4C1294NCPDT

工具/软件:Code Composer Studio

您好!

我们使用的是 TM4C1294NCPDT Launchpad。 在该 launchpad 中,我们通过使用计时器执行了程序来生成1ms 延迟,但我们无法生成延迟。

当我们将较小的值(例如:120000)加载到计时器寄存器时,在这种情况下,经过一段时间后,它不会进入 ISR。  

请仔细检查代码

int main (空)

ui32SysClock=SysCtlClockFreqSet ((SYSCTL_XTAL_25MHz | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480)、120000000);

SysCtlPeripheralEnable (SYSCTL_Periph_GPION);
SysCtlPeripheralEnable (SYSCTL_Periph_TIMER0);

GPIOPinTypeGPIOOutput (GPIO_PORTN_BASE、GPIO_PIN_0 | GPIO_PIN_1);

TimerConfigure (TIMER0_BASE、TIMER_CFG_PERIODICASE);

 TimerConfigure (TIMER0_BASE、TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PERIODICASE);

周期= 120000;

TimerLoadSet (TIMER0_BASE、TIMER_A、PERIODE-1);

IntEnable (INT_TIMER0A);
TimerIntEnable (TIMER0_BASE、TIMER_TINA_TIMEOUT);
IntMasterEnable();

TimerEnable (TIMER0_BASE、TIMER_A);

while (1);

返回0;

空 Timer0IntHandler (空)

TimerIntClear (TIMER0_BASE、TIMER_TINA_TIMEOUT);

if (GPIOPinRead (GPIO_PORTN_BASE、GPIO_PIN_1))

GPIOPinWrite (GPIO_PORTN_BASE、GPIO_PIN_1、0);

其他

GPIOPinWrite (GPIO_PORTN_BASE、GPIO_PIN_1、2);

谢谢、此致、

Venkatadri