Checking Fuses

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

Checking Fuses

Jump to solution
884 Views
rnicolls
Contributor III

Hi,

I'm currently working with the IMXRT1176 and am looking for a way to verify what boot fuses have been blown. I've been reading through User Manual and had a look at the peripherals view in MCUXpresso but haven't yet seen anything that could indicate what fuses are blown. 

Thanks,

Rory

0 Kudos
1 Solution
836 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @rnicolls,

You can use the OTP configuration button of the Secure Provisioning Tool to read and write fuses on the RT1170. For more information about this tool refer to the SPT User Guide. Section "5.2.3 OTP/PFR/IFR configuration" provides more details about this feature.

BR,
Edwin.

View solution in original post

0 Kudos
3 Replies
775 Views
carstengroen
Senior Contributor II

@rnicolls ,

I use the following code on 1176, maybe it can help you in some way:

#define FUSE_REGISTER_BT_FUSE_SEL 0x16 	// This is (0x960 - 0x800) >> 4. BT_FUSE_SEL bit is number 4 in this register (register address 0x960)
										// Page 2186 in the UM for 1176 shows this formula (OCOTP control and status register)
#define SET_BT_FUSE_SEL	0				// Set this to 1 to set the BT_FUSE_SEL

//----------------------------------------------------------------------------
// 
//----------------------------------------------------------------------------
void setFuses(void) {
    uint32_t version;
   /*
     * When the macro FSL_FEATURE_OCOTP_HAS_TIMING_CTRL is defined as 0, then the
     * OCOTP clock frequency is not used, pass in 0 directly.
     */
#if (defined(FSL_FEATURE_OCOTP_HAS_TIMING_CTRL) && FSL_FEATURE_OCOTP_HAS_TIMING_CTRL)
    OCOTP_Init(OCOTP, EXAMPLE_OCOTP_FREQ_HZ);
#else
    OCOTP_Init(OCOTP, 0U);
#endif

    /* Get the OCOTP controller version. */
    version = OCOTP_GetVersion(OCOTP);

    status_t status   = kStatus_Success;
    uint32_t fuseData = 0U;

	// read original value from the register with BT-FUSE_SEL
    status = OCOTP_ReadFuseShadowRegisterExt(OCOTP, FUSE_REGISTER_BT_FUSE_SEL, &fuseData, 1);

    if (status != kStatus_Success) {
		messageDebug(DBG_ERR, __FILE_NAME__, __LINE__,"Error in OCOTP_ReadFuseShadowRegisterExt(), rc=", status );  
		return;
    }

	messageDebug(DBG_INFO, __FILE_NAME__, __LINE__,"OCOTP_ReadFuseShadowRegisterExt(), fusedata=0x%08X", fuseData);  

	
	#if defined(SET_BT_FUSE_SEL) && SET_BT_FUSE_SEL
		// Program the original value plus bit 4 set (BT_FUSE_SEL)
		status = OCOTP_WriteFuseShadowRegister(OCOTP, FUSE_REGISTER_BT_FUSE_SEL, fuseData | (0x10));

		if (kStatus_Success == status) {
			status = OCOTP_ReadFuseShadowRegisterExt(OCOTP, FUSE_REGISTER_BT_FUSE_SEL, &fuseData, 1);
			if (status != kStatus_Success) {
				messageDebug(DBG_ERR, __FILE_NAME__, __LINE__,"Error in OCOTP_ReadFuseShadowRegisterExt(), rc=", status );  
				return;
			}

		} else {
			messageDebug(DBG_ERR, __FILE_NAME__, __LINE__,"Error in OCOTP_WriteFuseShadowRegister(), rc=", status );  
		}
	#endif
}
Tags (1)
0 Kudos
837 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @rnicolls,

You can use the OTP configuration button of the Secure Provisioning Tool to read and write fuses on the RT1170. For more information about this tool refer to the SPT User Guide. Section "5.2.3 OTP/PFR/IFR configuration" provides more details about this feature.

BR,
Edwin.

0 Kudos
624 Views
rnicolls
Contributor III

Thank you, this helped.