How to burn BT_FUSE_SEL on RT1050

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to burn BT_FUSE_SEL on RT1050

8,501 Views
mali
Contributor III

Hi, we are currently developing a product on MIMXRT1051 and now want to burn the eFuses for series production using Keil MDK. As far as we understood from the Reference Manual, the eFuses only can be set when the software is running. Its clear, how to burn the fuses, but how can BT_FUSE_SEL be set? I cannot find anything about it in datasheet. Does anyone have an example how to do?

9 Replies

6,234 Views
Yuri
NXP Employee
NXP Employee

Hello,

  According to Chapter 5 (Fusemap) of i.MX RT1050 Reference Manual, Rev. 1, 03/2018,

BT_FUSE_SEL is located at fuse address 0x460, bit 4.

 


Have a great day,
Yuri

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

0 Kudos

6,234 Views
mali
Contributor III

Hi Yuri, thank you for your response.

I have already found the fuse address in Reference Manual, but I haven't any glue how to burn it without using MFGtool. Is there a possibility to set BT_FUSE_SEL using Keil MDK? Maybe flashing this bit at first time the controller is running?

Best regards

Martin

0 Kudos

6,234 Views
Yuri
NXP Employee
NXP Employee

Hello,

  I think the MFG is good choice today to burn the i.MX RT fuses. 

Look at section 5.8 of"i.MX MCU Manufacturing User's Guide.pdf",

Rev. 1, 01/2018, about  using the "load fuse" command.

  For example the command

 

load fuse 0x00000002 > 0x06

 

means writing 32-bit value 0x00000002 to OTP Bank 0, word 6 (ADDR = 0x06).

Look at section 42.5.1.23 [Value of OTP Bank0 Word6 (Configuration and Manufacturing Info.)

(HW_OCOTP_CFG5)] of i.MX RT1050 Reference Manual, Rev. 1, 03/2018.

It corresponds to offset 460h of the fusemap.

Regards,

Yuri.

6,234 Views
mali
Contributor III

Hi Yuri,

many thanks for your reply, that gave me the required hint.

Now I could implement the following code into firmware which burns the BT_FUSE_SEL at first startup of the firmware. At series production the debugger programs the flash and invokes the first start. So I do not need the whole boot settings any more.

    //Write Fuses
if (!(SRC->SBMR2 & SRC_SBMR2_BT_FUSE_SEL_MASK))
{
    int timing = OCOTP_TIMING_STROBE_PROG(1325) | OCOTP_TIMING_RELAX(2) | OCOTP_TIMING_STROBE_READ(11) |OCOTP_TIMING_WAIT(24); //ipg_clk=132MHz, Calculation described at Chapter 42.3.3 OTP Read/Write Timing Parameters
    OCOTP->TIMING = timing;
    while ((OCOTP->CTRL & (1<<OCOTP_CTRL_BUSY_SHIFT)) || (OCOTP->CTRL & (1<<OCOTP_CTRL_ERROR_SHIFT))); //Check that HW_OCOTP_CTRL[BUSY] and HW_OCOTP_CTRL[ERROR]are clear
    int ocotp_ctrl = OCOTP->CTRL;
    ocotp_ctrl &= ~OCOTP_CTRL_ADDR_MASK;
    ocotp_ctrl|= OCOTP_CTRL_ADDR(6);
    ocotp_ctrl &= ~OCOTP_CTRL_WR_UNLOCK_MASK ;
    ocotp_ctrl|= OCOTP_CTRL_WR_UNLOCK(0x3E77);
    OCOTP->CTRL = ocotp_ctrl; //Write ADDR and unlock
    OCOTP->DATA = (long)((1<<4)|(1<<16));//burn BT_FUSE_SEL (1<<4) and FORCE_INTERNAL_BOOT (1<<16)
}

Maybe the code is from interest for someone else.

Best regards

Martin

6,234 Views
ng_h_nhan0207
Contributor I

Dear Martin Litschauer,

Can you give me a sample of burn the BT_FUSE_SEL to IMXRT1050, I am using the MCUXpresso IDE.

Thank you for your supporting.

Best regards,

Nhan Nguyen.

0 Kudos

6,234 Views
mali
Contributor III

Dear Nguyen Nhan,

please see the example code above, that ist exactly what I am using (at Keil MDK).

Best regards

Martin

0 Kudos

6,234 Views
carstengroen
Senior Contributor II

Martin,

can you perhaps explain a little more how you do this in production ?

I have a (RT1062/RT1064) design running, and currently I have the BT_CFG_xx signals tied to GND. This I would like to change (use them for GPIO/LCD etc), but in order to do so, I need to blow the BT_FUSE_SEL as I understand it. The code you presented above will do that if I understand correctly. But, how do you get the processor to execute that code when programmed into the flash ? Does the BT_CFG_xxx signals not need to be set correctly initially for the code to execute at all, or do you do some tricks using debugger/loader ?

(I use Keil)

0 Kudos

6,234 Views
mali
Contributor III

Hi Carsten,

We are using a batch file which starts keil in background. It is also possible to start the code execution after downloading to flash (see µVision User's Guide: Command Line ). So it starts the first time with debugger after programming the flash. As result the fuses will be burned at that time.

Best regards

Martin

6,234 Views
carstengroen
Senior Contributor II

Thanks Martin!,

that was kind of what I figured you would do, thanks for confirming :smileyhappy:

Do you mind having a look on this topic also, I can't get the timing for the fuse programming correct: https://community.nxp.com/thread/492451 

0 Kudos