工具/软件:Code Composer Studio
您好! 我叫 Antonio Uriel、来自墨西哥墨西哥城。 我在 code composer studio 中的代码有问题、这会在我停止运行程序后出现
我制作了一个简单的程序来刷写 LED、其中包含使用 SysTickTimer 的 EK-TM4C1294卡我公开了我的代码、添加了包括属性 add Tiva ware 和 driverlib.lib 在内的库、我不知道我是否错过了 add 或其他内容、 我希望您的快速响应会有点紧急。
Codigo:
#include
#include
#include "inc/tm4c1294ncpdt.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_memmap.h"
#include "driverlib/SysTick .h"
//变量全局变量
int Estado=0;
//funciones globales
void DelaySysTick (int tiempo);
void main (void)
{
//Puerto N
//Habitilit el 模数 GPIO N
SysCtlPeripheralEnable (SYSCTL_Periph_GPION);
//espera que el modulo GPIO N este listo
while (!SysCtlPeripheralReady (SYSCTL_Periph_GPION));
//Configuramos el Puerto N 0 y 1 como salidas
GPIOPinTypeGPIOOutput (GPIO_PORTN_BASE、GPIO_INT_PIN_0|GPIO_INT_PIN_1);
//********* 方案主管
while (true)
{
GPIOPinWrite (GPIO_PORTN_BASE、GPIO_INT_PIN_0|GPIO_INT_PIN_1、Estado);
Estado^í a = 0x03;
DelaySysTick (16000000);
}
}
空 DelaySysTick (int tiempo)
{
//Configuramos y habilitamos el SysTick
SysTickPeriodSet (tiempo);
SysTickEnable();
while (SysTickValueGet ()==0);
SysTickDisable();
}
