Other Parts Discussed in Thread: EK-TM4C123GXL
I am running a modified version of the TivaWare 2.1.3.156 blinky example on the EK-TM4C123GXL LaunchPad trying to get the ROM bootloader working.
I have added the following as the first lines of main():
if(HWREG(FLASH_BOOTCFG) & FLASH_BOOTCFG_NW)
{
// not committed yet
HWREG(FLASH_FMD) = (HWREG(FLASH_BOOTCFG) & 0x7fff00ec) | (FLASH_BOOTCFG_PORT_F | FLASH_BOOTCFG_PIN_4 | FLASH_BOOTCFG_KEY | FLASH_BOOTCFG_DBG1);
HWREG(FLASH_FMA) = 0x75100000;
HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT;
while(HWREG(FLASH_FMC) & FLASH_FMC_COMT)
{}
}
With a debugger I can verify that the value 0x7fffb0fe is written to BOOTCFG when the program is run for the first time. When power cycling the LaunchPad the change to BOOTCFG is committed but the LED no longer flashes. (I have a jumper to connect PF4 to +3.3V; there is no pull-up on the LaunchPad).
I have no idea why the main program does not execute. The strange thing is that if I change the code to use pin PB1, everything works as expected. PF4 is not a protected pin and this should thus not be affected by errata MEM#19. I am out of ideas why.