Burn exact MAC address to eFuse in imx6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Burn exact MAC address to eFuse in imx6

6,501 次查看
davidyu
Contributor I

I know one can use "echo" command to write MAC address to HW_OCOTP_MAC0 via sysfs.

But another question is :   MAC address is 48-bit ,however,  each fuse block is 32 bit.

All examples that we found is "echo 0x10234567 > /sys/fsl_otp/HW_OCOTP_MAC0" , cannot found 48-bit version.

Is separate MAC address to two part, first part (i.e. first 16bit) burn to HW_OCOTP_MAC0 and rest part burn to HW_OCOTP_MAC1 ?

Thanks for kindly help!

标记 (3)
0 项奖励
回复
1 回复

2,652 次查看
Yuri
NXP Employee
NXP Employee

For the 48bits on the MAC ADDR there are two mac registers: HW_OCOTP_MAC0 and HW_OCOTP_MAC1

The order is a follows

    HW_OCOTP_MAC1 = (((mac_data[0] & 0xFF) << 8) | (mac_data[1] & 0xFF));

    HW_OCOTP_MAC0 = (((mac_data[2] & 0xFF) << 24) | ((mac_data[3] & 0xFF) << 16) | ((mac_data[4] & 0xFF) << 8) | (mac_data[5] & 0xFF));


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复