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 重新修改MAC地址问题

Other Parts Discussed in Thread: UNIFLASH, LMFLASHPROGRAMMER

各位好:

想透過通訊來修改MAC,若原本是FF-FF-FF-FF-FF-FF改成任意值OK,但改過一次後就無法再變更成想要的數值

1.有試過 ROM_FlashErase(0x400FE1E0) 清除再用ROM_FlashUserSet(0x----------,0x--------)寫入,但不行呢;

2.使用LMFlash是可恢復成FF-FF-FF-FF-FF-FF, 但不知是否可以在程式中直接進行修改MAC?

  • 1.更改一次后需要再次改变的话需要解锁才可以的。可以通过lmflash或者unflash解锁。
    2.你试试解锁情况下用下面的代码试试
    MAP_FlashUserSet(ui32User0, ui32User1);
    MAP_FlashUserSave();
    ui32User0 = 0;
    ui32User1 = 0;
    MAP_FlashUserGet(&ui32User0, &ui32User1);
  • 感謝回復

    是的,解鎖後是可以用程式寫進去

    但可能需要在程式中進行不只一次的修改MAC,不知解鎖是否可利用程式碼

  • 您可以使用Uniflash对MAC地址进行编程。仅当您具有ICDI调试探针时,才可以使用LM Flash编程器来编程MAC地址。

  • 可能我表達的沒有很清楚
    用lmflash或者unflash都ok,可編程MAC ->解鎖 ->再次編程MAC

    不過是否能在解鎖情況下,重覆利用 『程式碼 FlashUserSet 編程MAC』 (第一次OK),第二次就不是寫入的值了
    EX:00-00-00-01-02-58 OK ->00-00-00-01-02-56 Fail ,得到的值是00-00-00-01-02-50,
    所以不能透過ROM_FlashErase(0x400FE1E0)清除後,再FlashUserSet 編程MAC ?????
  • 您可以尝试使用 FlashUserSet(user0,user1)以及FlashUserGet(&valuser0,&valuser1 )来修改MAC地址

    使用时请注意

    1 首先您需要擦除寄存器,因为它可能具有原始的MAC地址。请使用LMFlashProgrammer/uniflash运行解锁功能。

    2 您可以通过调试器检查FLASH_USER0和FLASH_USER1寄存器是否实际包含该值

    3 if the register is already programmed to a non 0xFFFFFFFF value, then a new value being programmed to this register would not yield the same value. Only the bits that are 1 which may become 0 will be turned. Consider this as an AND of the existing register value with the new value you are programming to it.
  • 所以 首先您需要擦除寄存器,因为它可能具有原始的MAC地址。请使用LMFlashProgrammer/uniflash运行解锁功能 這個部份
    一定得用 外部軟體 LMFlashProgrammer/uniflash 來處理 ?? 無法使用程式碼達感
  • There are a few registers in Flash Memory that can be committed and thus made non-volatile. These include the BOOTCFG, FMPRE, FMPPE and USER_REG's. If they have been committed then you would need to run the unlock sequence to restore the content back to factory default.

    If not then a simple erase of the application code followed by a power cycle will restore them.