SPMA078 March 2021 TM4C1290NCPDT , TM4C1290NCPDT , TM4C1290NCZAD , TM4C1290NCZAD , TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1297NCZAD , TM4C1297NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129CNCPDT , TM4C129CNCPDT , TM4C129CNCZAD , TM4C129CNCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD
In both examples, when neither switch is depressed, the LEDs alternate at a rate of about ten times per second. This is accomplished with a simple software loop. When a switch is depressed, extra time is required to update the FEE dataset and output the value on the UART. This is usually not noticed by the casual observer. However, periodically the data sector and the copy sector must be erased. As seen in Section 4.2.3 this can add 90 ms or more. This delay can be minimized by using interrupts instead of polling to complete the EEPROM programming and to send the data out the UART.
To use EEPROM interrupts in the FEE driver define the symbol EEPROM_INTERRPTS. You can add this definition in the file feeConfig.h, or add it to Code Composer Studio’s predefined symbols section. This causes fee.c to enable the EEPROM interrupt after each attempt to write to the EEPROM and disable the interrupt in FeeMainFunction(). The EEPROM module will generate interrupts on completion of either a read or a write to the EEPROM. The interrupt on the read is not necessary because the read value is returned immediately. By enabling and disabling the EEPROM interrupt the FEE driver avoids the unnecessary interrupts on EEPROM reads.
In the example "FeeExampleInt", the file main.c also includes a flash interrupt service routine, FlashIntRoutine(). This routine is statically added to the vector table by adding it to the statup_ccs.c file. The flash interrupt service routine checks that the source of the flash interrupt is from the EEPROM module and then calls FeeMainFunction().
In this example UART0 is also serviced by interrupts. This is done by defining the symbol “UART_BUFFERED” in Code Composer Studio’s predefined symbols section and statically adding the function UARTStdioIntHandler() to startup_ccs.c.