APPNOTE-39 MM6108 OTP for BCF and MAC Read and Write Guide
v3
1 Overview
The Morse Micro MM6108 software contains the functionality to read and write the Wi-Fi HaLow MAC address on the chip, as well as a board ID that can be used to select the appropriate board configuration file. The MAC address and board ID is stored in One Time Programmable (OTP) memory.
OTP programming is an advanced process that should be conducted in a controlled manufacturing environment by a sophisticated user.
2 Program Conditions
The following conditions must be followed to ensure the device is not damaged.
VDDIO must be driven at 2.5V±10% to program the OTP bits. Voltage set beyond the specified allowance will lead to chip damage.
Each OTP bit can only be programmed once in the chip lifetime. If multiple write instructions are made to the MAC address bits the firmware will report an error.
Note: An unprogrammed bit will read as a 0 and a programmed bit will read as a 1.
3 Program Conditions
Prior to attempting to read the MAC address, ensure that the morse driver is inserted with the wlan0 interface up. To read the MAC address stored in the OTP memory, run the following morsectrl command:
# morsectrl macaddr
3.1 Original factory settings
By default, the MM6108 module does not have a MAC address or board ID burned into OTP memory. After running the above command, the expected output should be:
# morsectrl macaddr
Chip MAC address: 00:00:00:00:00:00
If the MAC address has not been burned into the chip, the Morse Micro starting script will load one given the following mapping:
OTP Bits
7:0
15:8
23:16
31:24
39:32
47:40
Value
0x0C
0xBF
0x74
eth0 B3
eth0 B4
eth0 B5
The following demonstrates the MAC address allocation in the instance that a MAC address has not been burned into the chip. The highlighted portion indicates that the last three octets of the chip MAC are derived from the eth0 MAC address.
# morsectrl macaddr
Chip MAC address: 00:00:00:00:00:00
# ifconfig
eth0 Link encap:Ethernet HWaddr DC:A6:32:E1:0C:36
inet addr:10.53.2.10 Bcast:10.53.255.255 Mask:255.255.0.0
inet6 addr: fe80::dea6:32ff:fee1:c36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2958 errors:0 dropped:562 overruns:0 frame:0
TX packets:979 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:307152 (299.9 KiB) TX bytes:155359 (151.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:184 errors:0 dropped:0 overruns:0 frame:0
TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13909 (13.5 KiB) TX bytes:13909 (13.5 KiB)
wlan0 Link encap:Ethernet HWaddr 0C:BF:74:E1:0C:36
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ebf:74ff:fee1:c36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:160132 errors:0 dropped:2 overruns:0 frame:0
TX packets:141731 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:201277497 (191.9 MiB) TX bytes:178353026 (170.0 MiB)
4 Writing the OTP MAC Address
Prior to writing the MAC address, ensure that the Program Conditions are adhered to. This indicates that:
The chip must have a VDDIO set to 2.5V, and
The MAC OTP bits must only be set once in the chip lifetime.
To write the MAC address to the OTP memory, run the following morsectrl command:
# morsectrl macaddr -w <XX:XX:XX:XX:XX:XX>
⚠️ Note that after setting the MAC address, the return address may not match the MAC address specified until a restart is conducted.
After conducting the write command the voltage can be set back to the normal operational level if required. The morse driver must be reloaded for the burned OTP bits to be read correctly. To see the OTP write in effect, reboot the device or run the restart script:
#/etc/init.d/S99morse restart
After reloading the morse driver, the MAC address will be read from the OTP bits memory.
Example usage of this functionality is demonstrated below:
# morsectrl macaddr -w 0C:BF:74:AA:BB:CC
Chip MAC address: cb:4c:83:14:f9:5f
# /etc/init.d/S99morse restart
# ifconfig
eth0 Link encap:Ethernet HWaddr DC:A6:32:E1:0C:36
inet addr:10.53.2.10 Bcast:10.53.255.255 Mask:255.255.0.0
inet6 addr: fe80::dea6:32ff:fee1:c36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:357629 errors:0 dropped:90597 overruns:0 frame:0
TX packets:14481 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40781633 (38.8 MiB) TX bytes:2412501 (2.2 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15277 (14.9 KiB) TX bytes:15277 (14.9 KiB)
wlan0 Link encap:Ethernet HWaddr 0C:BF:74:AA:BB:CC
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ebf:74ff:fee1:c24/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1064 (1.0 KiB)
5 Revision History
01
03/08/2022
First release
02
20/10/2023
1st Doc. Control
03
14/05/2025
Updated per template
Last updated
Was this helpful?