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.

hang up after call ROM_FlashErase(0xF0000), chip TM4C129ENCPDT

Other Parts Discussed in Thread: TM4C129ENCPDT

Hi~All

I meet an issue that after I call ROM_FlashErase (0xF0000), my firmware sometimes hangs up, but if I only call ROM_FlashErase (0x1C000) and mark ROM_FlashErase (0xF0000), it always works fine.

How do I solve this issue? Thanks :-)

Chip: TM4C129ENCPDT

My code is like the following

void my function {

    ROM_FlashErase (0xC000);

    ROM_FlashProgram (0x1234, 0xC000,4);

    ROM_FlashErase (0x1C000);

    ROM_FlashProgram (0x1234, 0x1C000,4);

    ROM_FlashErase (0xF0000);// <---Mark this line and then it always works fine.

    ROM_FlashProgram (0x1234, 0xF0000,4);

}

  • Hello Tu,

    What is the device revision you are using. You can check this by reading 0x400FE000 location.

    Also if I read the info correctly, doing a Flash Erase for location 0xF0000 causes the firmware to hand but if 0x1C000 is erased and then 0xF0000 then it does not hang? Also when the firmware hangs can you let us know what is the state of the CPU. Are you able to connect debugger?

    Regards

    Amit

  • Hi. Amit

    I found is the system clock set 120mhz.

    When I set 40mhz, the flash erase issue is fix.

    SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
                                               SYSCTL_CFG_VCO_480), 40000000);

  • Hello Tu,

    That should not be the case. Maybe it is worth debug. Could you please post your code so that we can check why it is behaving this way.

    Regards

    Amit