Part Number: EK-TM4C123GXL
Hi there,
I am using a software called Keil uVision 5. I am having an issue with my board in which I do not understand why.
When I write anything inside my 'while' loop, the board crashes. If the 'while' loop is empty, everything works fine. See below example:
#include "TM4C123.h"
int main()
{
SYSCTL->RCGCGPIO |=0X20;
GPIOF->DIR |=0X04;
GPIOF->DEN |=0X04;
GPIOF->DATA |=0x04;
while(1)
{}
}
The above code works fine. However, if I add anything inside the 'while' loop, the board crashes. See below:
#include "TM4C123.h"
int main()
{
SYSCTL->RCGCGPIO |=0X20;
GPIOF->DIR |=0X04;
GPIOF->DEN |=0X04;
while(1)
{
GPIOF->DATA |=0x04;
}
}
The first code works fine, but the second leads to a crash. Do you have any advice/recommendations?
Thank you.