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.

Compiler/TM4C123GH6PM: Calling a pointer to function initialized with integer value

Part Number: TM4C123GH6PM


Tool/software: TI C/C++ Compiler

I need to understand what exactly happens why the following code gives a hardfault

int main()

{

void (*FP)() = 0x4;

FP();

while(1)

{

}

}