I am trying to change and read my TM4C123G launchpad clock frequency to 80 MHZ using TIVAWARE libraries so here is my code:
#include <lm4f120h5qr.h>
#include <stdbool.h>
#include <stdint.h>
#include "driverlib/sysctl.c"
#include "driverlib/pin_map.h"
void main()
{
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
int x= SysCtlClockGet();
while(1){ }
}
I am facing two problems the first problem there is an error while compiling this code the error is:
Error[Li005]: no definition for "SysCtlDelay" [referenced from C:\Users\ZMK\Documents\TIVA C\IAR\TM4C FREQUENCY\Debug\Obj\main.o]
where SysCtlDelay() is a function and its definition is in the driverlib/sysctl.c included in the top. so I don't know why this is happening!!
the second problem is while debugging the code the local variable X doesn't show a value it only shows an unknown value, I tried to make it volatile but nothing changed too!!
thanks in advance.