Other Parts Discussed in Thread: MSP432E401Y
器件型号: MSP432E401Y
您好、
我正在使用 Segger Compact、并想使用它来设置 MSP432E401Y 上的 MAC 地址。
我可以从 JLink.exe 读回 MAC 地址 (MEM 0x400EC040、8)。
如何在对引导加载程序进行编程后设置 MAC 地址?
谢谢、
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.
Other Parts Discussed in Thread: MSP432E401Y
器件型号: MSP432E401Y
您好、
我正在使用 Segger Compact、并想使用它来设置 MSP432E401Y 上的 MAC 地址。
我可以从 JLink.exe 读回 MAC 地址 (MEM 0x400EC040、8)。
如何在对引导加载程序进行编程后设置 MAC 地址?
谢谢、
可以在 0x400FE1E0/4 写入 USER_REG0/1、但这些值不会持续存在(过复位)、直到它们处于“commited“(提交)状态。
提交过程在 TRM (SLAU723A) 第 7.2.3.12 节中进行了说明,并在 Driverlib 函数 FlashUserSave() 中进行了说明。 我想这可以在 JLink 脚本中完成,尽管我没有机会编写 busy-wait(循环)。
我没有看到.gel 过程来执行此操作。 调试器 (Tools->On-Chip Flash->MAC Address) 可以执行此操作、但这是一个手动过程。
【编辑:请记住,执行此提交后,您需要执行恢复出厂设置,然后才能再次执行。】
解决方案:
MAC 地址的编程过程是将 MAC 地址直接写入 USER_REGn (0x400FE1E0 - 0x400FE1EC)。 MAC 地址格式必须写为:-
接下来、将地址直接设置为闪存地址 (FMA) 寄存器 (0x400FD000) 中的 0x8000.000 (0-3)、最后设置闪存控制器 (FMC) 寄存器 (0x400FD008) 中的闪存写入密钥 (0xA442) 和 COMT 位(位 3)、然后等待 COMT 位被清除。
MEM 0x400EC040, 8 #read the MAC address location to verify it is empty W4 0x400FE1E0 0x00CCBBAA #write MAC bytes 0-2 to USER_REG0 W4 0x400FE1E4 0x00DDEEFF #write MAC bytes 3-5 to USER_REG1 MEM 0x400FE1E0, 4 #verify USER_REG0 MEM 0x400FE1E4, 4 #verify USER_REG1 W4 0x400FD000 0x80000000 #write USER_REG0 address to FMA W4 0x400FD008 0xA4420008 #commit data to USER_REG0 using FMC W4 0x400FD000 0x80000001 #write USER_REG1 address to FMA W4 0x400FD008 0xA4420008 #commit data to USER_REG1 using FMC MEM 0x400EC040, 8 #read the MAC address location to verify programming