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.

TM4C1294NCPDT: There is an exception using MAP_FlashUserSet and MAP_FlashUserSave to set the MAC address

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: UNIFLASH

Good afternoon, everyone. I have a problem that bothers me a lot. I hope you can help me.

I want to set MAC address for TM4C1294NCPDT development board.The MAP_FlashUserSet function and the MAP_FlashUserSave function are used to set MAC address,the

MAP_FlashUserGet function is used to get MAC address.

In TivaWare_C_Series-2.1.4.178\driverlib\rom_map.h:

In TivaWare_C_Series-2.1.4.178\driverlib\flash.c:

My test code is as follows:

When the development board has not written a MAC address, I will pass in a MAC address stored in pdata and set bwrite to true to indicate that I am ready to write to the Mac.Then I processed pdata to get ui32User0 and ui32User1, wrote the MAC address with Map_FlashUserSet, and then saved it with Map_FlashUserSave.When bwrite is set to false, I use MAP_FlashUserGet to get the MAC address and assign it to the structure cMac.cMac is used to display MAC addresses.

My problem is that the first time I write to the MAC address, the data I read with MAP_FlashUserGet is correct.However, when I re-use the MAP_FlashUserSet and MAP_FlashUserSave functions to modify the MAC address, the data I read back is still the same as before.

Map_flashUserSet and map_flashUserSave can only set the MAC address once?How can I solve this problem?Any suggestions from anyone would be most appreciated.

  • Hi ctc,

      The behavior is correct. Once you write with FlashUserSave, the content in the user0/user1 is permanently stored. This is an non-reversible operation. A chip reset or power cycles does not change the flash operation. In another word, this is a write-once only register. You must do a "Unlock" operation to restore the chip to its factory setting. Please see below description.

     If you want to write to the User0/User1 registers without committing, then don't call the FlashUserSave. Calling FlashUserSet is only temporary until the next reset or power cycle. 

  • Thank you for your advice.If I want to rewrite it, how do I unlock it and restore it to factory Settings?Do I need help from the manufacturer or do I have other operation documents for reference?

  • Hi ctc,

      Yes, you can unlock by using either the LM flash programmer or Uniflash. Please note LM flash programmer only support ICDI debug probe. If you have a custom board with different debug probe such as XDS200 then you need to use Uniflash.