Writing i.MX6 Fuses Using VTOS Program
The following is a short tutorial demonstrating how you can program the fuses on any i.MX6 circuit board design. This demonstration uses the VTOS Program product from Kozio. Also used is a USB and Serial connection to the target i.MX6 reference board – we used both a SABRE and Neutrino reference board.
The process uses a Kozio tool for loading VTOS firmware over the USB connection, and then uses a serial connection for communications. With the VTOS program product all fuses can be programmed. Customers typical program MAC addresses, secure keys, or other data required by the boot process or application software.
The key advantage to Kozio’s solution is that it can be used in an automated process for manufacturing. It is also easy to use, supported, and documented.
Program i.MX6 OTP Fuses (Test Run)
The general process for programming the OTP fuses in the i.MX6 is as follows:
- In Windows File Explorer, make a copy of the file %KOZIO_HOME%\examples\imx6_fuse_template.ksc.
- Edit your copy of the fuse file using any text editor.
- Remove the comments from any lines corresponding to the fuse registers you want to blow.
- Launch VTOS Program
- Create a new configuration and choose an i.MX6 processor.
- Click on Connections and update your settings for your PC to target connection.
- Click on Connect in order to run these operations.
- Under Fuse Operations, right-click and select Add Fuse From File.
- For the Fuse Definition File, browse to the new fuse file you just created.
- Ensure the Blow Fuse setting is False for initial testing.
- Optional: For debug purposes, we added two commands as Setup Actions and two commands as Cleanup Actions. that will display the values of two fuse registers, before and after our Fuse From File operation
- Click on Setup Actions
- Click on the ellipses button that appears. This will bring up the Configure Actions dialog.
- Double-click on Run Command (to add a new action).
- Select the new Run Command under Actions to Perform.
- Under Action Properties, click to the right of Command and add “0x23 imx6.otp.read .hex32 cr“. This will read fuse register 0x23 and display the value as a hexadecimal 32-bit value.
- Double-click on Run Command (to add a new action).
- Select the new Run Command under Actions to Perform.
- Under Action Properties, click to the right of Command and add “0x22 imx6.otp.read .hex32 cr“. This will read fuse register 0x22 and display the value as a hexadecimal 32-bit value.
- Click OK.
- Now click on Cleanup Actions and follow the previous 8 steps to add the same two commands as cleanup actions.
- Right click on the Fuse From File node and select Run.
- Below is the output on my SABRE Lite reference board. Note that the fuses at 0x22 and 0x23 initially contain the factory programmed MAC, and then contain the MAC address as specified in my fuse file.
DUT ready VTOS iMX6 Program Firmware Version 03.01.002 2016-03-07 at 17:15:14 0x23 imx6.otp.read .hex32 cr 0x00000319 0x22 imx6.otp.read .hex32 cr 0xB80104A9 IMX6.OTP.FUSE.DISABLE // Write to shadow registers only Disabling i.MX6 OTP Fuse Mode include %KOZIO_HOME%\VTOS_Program\imx6_fuse_sabrelite.ksc Include %KOZIO_HOME%\VTOS_Program\imx6_fuse_sabrelite.ksc i.MX6 OTP Write: Shadow Register Mode i.MX6 OTP Write: Shadow Register Mode include added 0 bytes,1047948 left. [PASSED] 0x23 imx6.otp.read .hex32 cr 0x00000004 0x22 imx6.otp.read .hex32 cr 0x9F112233
Program i.MX6 OTP Fuses (Live Run)
Because the Blow Fuse setting was set to False in our test run, VTOS Program only updates the shadow fuse register. If the processor is reset, the settings will revert to the real fuse settings. When the “Disabling i.MX6 OTP Fuse Mode” message is displayed, it indicates that VTOS Program will skip the actual fuse programming and write to the shadow registers only.
Once you change the Blow Fuse setting to True, the fuse operation becomes permanent. Here is example output from an i.MX6Q SABRE Lite board. Note that the upper MAC address register (offset 0x23) changes for 0x0000_0319 to 0x0000_0719.
0x23 imx6.otp.read .hex32 cr 0x00000319 0x22 imx6.otp.read .hex32 cr 0xB80104A9 IMX6.OTP.FUSE.ENABLE // Permanently blow fuses Enabling i.MX6 OTP Fuse Mode include %KOZIO_HOME%\VTOS_Program\imx6_fuse_sabrelite.ksc Include %KOZIO_HOME%\VTOS_Program\imx6_fuse_sabrelite.ksc i.MX6 OTP Write: Fuse Mode i.MX6 OTP Write: Fuse Mode include added 0 bytes,1047948 left. [PASSED] 0x23 imx6.otp.read .hex32 cr 0x00000719 0x22 imx6.otp.read .hex32 cr 0xB80104A9
Key Notes
Each bit in a fuse register can be programmed from a 0 to 1, exactly once. However, you can program the same fuse register multiple times, provided that the new value does not attempt to set any bits that were already 1 back to 0.
Note that the specific fuse register definitions vary based on the i.MX6 processor type. See the corresponding i.MX6 Technical Reference Manual for details of all available fuse registers.