Hello, I am using tm4c123g microcontroller(cortex m4) and successfully programmed led blink, created 16x2 and 128x64 library files using CMSIS standard. But when I try to write any value in UART register, it causes the cpu to jump into hard fault. Example UART0->CTL&=~1; triggers the hard fault handler. I am facing this problem with all other UART registers like baud registers.
BTW I am able to do it with direct memory addressing. But I want to use UART funcions in CMSIS. I don't know what's going wrong please help.
"I have got the solution. The base address for UART0 register was wrong in the controller header file."
This was the first thing I told you to check. And you still came back and told us you had debugged but not found anything...
Next step now is to verify if it was the chip manufacturer, Keil or maybe the board vendor who supplied the header file. And if it was the most recent version of the file that you used - this kind of errors normally gets quite quickly corrected since they are so quick to find when someone tries to actually make use of the file. It's the seldom used rare configuration flags that may survive for a long time with incorrect values since no one is actually using them - or verifying that they did take effect as intended.