Hi, I am programming a TM4C123GH6PM device from TI and I get an error when trying to modify the GPIO commit register. It is defined in the GPIOA_Type struct (in C:\Keil_v5\ARM\PACK\Keil\TM4C_DFP\1.0.0\Device\Include\TM4C123\TM4C123GH6PM.h file) as a constant
__I uint32_t CR; /*!< GPIO Commit*/
this makes the compiler to fail with message: "read-only variable is not assignable" when trying to modify it. Is this a bug in the header file? How am I supposed to modify this register?
Javi
You keep saying that I don't have to modify that register but you don't explain why, that's not very useful. In Valvano's ARM cortex-M Microcontrollers book he says that you have to do so for some GPIOs ("Last I looked, it said something about this entire mechanism not actually existing for the vast majority of GPIOs on that chip." yes, you are right, there are only a few GPIOs that use this mechanism but that doesn't mean that you can't use them!). If the datasheet defines those bits as modifiable it has no sense to define them as read-only in the header file (in previous versions of the file this didn't happen). More people found this issue: http://www.keil.com/forum/23862/
Regards