This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

About TM4C123H6PZI FLASH PROGRAMMING

Other Parts Discussed in Thread: TM4C123GH6PZ

Dear all, the mcu in my custom board is TM4C123H6PZI, the emulator is XDS100V3, the problem is:

When the mcu's flash is empty, no matter using "Lm flash programmer"  through  mcu's UART0 or using the emulator, the firmware image can  be programmed into the mcu's flash successfully; but  when the mcu's flash is not empty,no matter using "Lm flash programmer"  through   mcu's UART0 or using the emulator,the firmware image cann't  be programmed into the mcu's flash . I doubt if the mcu's flash could be programmed only once or was protected by  routines. Can anyone help me?

regards,

Rolan

 

  • Can you erase using LMFlash and then program the device?  Try both the erase "Entire Flash" and "By Address Range".  Both the UART boot loader and the LMFlash default loader will page erase as they go to erase flash before writing it.

  • The main function first called the function DldInit() as follow,when the chip is LM4F232H5qc,it can work correctly, but when the chip is TM4C123GH6PZ, the chip's flash ram cann't be programmed,erased again anyway.But according to the datasheet, when the key bit of bootcfg register is set to 0, Writes to the FMC/FMC2 register with a 0xA442 key are ignored, if so, the flash ram should be programmed again,but why not?

    are ignored.

     

    void DldInit(void)

    {

      volatile unsigned long regVal ;

       //write the BOOTCFG flash register to enable PA1 low to enable

      //the ROM bootloader at poweron

      regVal = HWREG(0x400FE000 + 0x1D0);       //BOOTCFG

       if (regVal & 0x80000000)                        //committed yet?

      {

           HWREG(0x400FD000 + 0x000) = 0x75100000;    //FMA=BOOTCFG "address"

           HWREG(0x400FD000 + 0x004) = FLASH_BOOTCFG_PORT_A | FLASH_BOOTCFG_PIN_6 | FLASH_BOOTCFG_DBG1 ;

          //FMD=BOOTCFG value (PA6 low/DBG enabled)

           HWREG(0x400FD000 + 0x008) = 0xA4420008;    //FMC=key+commit

          //HWREG(0x400FD000 + 0x008) = 0x715d0008;    //FMC=key+commit

           ROM_SysCtlDelay( ROM_SysCtlClockGet() );          // delay

       }

     return;

    }

  • Hi Tang,

    How you calculated the address of FMA=BOOTCFG "address" as 0x75100000??

    Best Regards,

    Santosh.