I just updated uVision to v4.72.10.0 from v4.71 so that I may build code for TI TM4C123GH6PM. The header file for I/O register definitions, C:\Keil\ARM\INC\TI\TM4C123\TM4C123GH6PM.h, is written in a new format using struct to group all the registers of a module together. Now GPIO_PORTF_DATA_R becomes GPIOF->DATA. Portability and compatibility with TI's TivaWare certainly becomes an issue.
The GPIO Commit Register is defined as __I uint32_t CR; in struct GPIOA_Type and all six GPIO ports are defined with GPIOA_Type. That makes the Commit Register read-only. The commit register bits of GPIOD7 and GPIOF0 and the four JTAG pins of GPIOC should be read/write bit. Or am I missing something?
"C:\Keil\ARM\INC\TI\TM4C123\TM4C123GH6PM.h, is written in a new format using struct "
What a nice change - long overdue.
The device specific header files are not meant to be used with TivaWare / StellarisWare: they use inc/hw_xxx and driverlib/xxx header files instead, as stated in the TivaWare manual.
See Keil as just a compiler.
Select the header files that best suits your intended use of libraries.
The StellarisWare and the compiler device header files used to be identical prior to v4.72, but not anymore.
I am sure we can write code to work with one header file or the other. My concern is about portability.
Surely, TivaWare is self-contained - is does not use device headers from the compiler...?
Use the older header file if that helps.
And complain to Keil if you see any errors in the newer file.
View all questions in Keil forum