IMXRT1170EVKB: Can I use spsdk + flashloader to execute code in external nor spi flash? Wrong fuses

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

IMXRT1170EVKB: Can I use spsdk + flashloader to execute code in external nor spi flash? Wrong fuses

968 Views
leviriley1
Contributor I

I have been using spsdk to flash and program fuses on an imxrt1170EVKB
But I wrote the wrong fuse settings so it is now, incorrectly, looking for the qspi nor flash to be using the alternative pins.

Loading the fcb into ram this way does seem to work correctly as I can still flash the device but not boot as the memory is cleared on reset.

Can I use the spsdk and flashloader to start executing my firmware image from flash memory?

The following works up to the execute command, which doesn't error out but the device still does not boot.

My flash starts at 0x30000000, the fcb is stored from 0x30000400 to 0x30000600, and my image starts at 0x30001000

 

with McuBoot(self._interfaces[0], True) as mb:
    ####This is working ####
    # Fill memory with initial data self._logger.debug("fill memory") 
    mb.fill_memory(self.ROM_FCB_START, 4, 0xCF900001) 
    # Configure memory for FlexSPI NOR 
    mb.configure_memory(self.ROM_FCB_START, 9) 
    # Write the actual FCB to the 
    FlexSPI NOR memory self._logger.debug("write FlexSPI NOR FCB") 
    mb.write_memory(self.ROM_FCB_START, fcb_data)
    mb.configure_memory(self.ROM_FCB_START, 9)

    ###Can I have it execute code from flash?###

    jump_address = 0x30001000  # Starting address of your image in flash
    argument = 0x00000000      # Optional argument, use 0 if not needed
    stack_pointer = 0x00000000 # Set to 0 to let the code initialize it

    # Execute the code from flash (didn't work)
    mb.execute(jump_address, argument, stack_pointer)

 

 

Alternatively I may be able to boot from sdcard but would prefer to just run a python script to boot from flash as the project I am working on is booting from flash.

0 Kudos
Reply
3 Replies

933 Views
Sam_Gao
NXP Employee
NXP Employee

Hi,

'I wrote the wrong fuse settings',

would you please clarify more details about it?  you can use SPT or MCUBootUtility to get fuse data. 

 

0 Kudos
Reply

924 Views
leviriley1
Contributor I

Hi these are the fuses I accidentally wrote:

#fuses.append([22, 0x00000010, 0x00000010]) #setting BT_FUSE_SEL to 1: use fuses for boot configuration
#fuses.append([26, 0x00000400, 0x00000400]) #FLEXSPI_PIN_GROUP_SEL to 1: select secondary pin group

0 Kudos
Reply

902 Views
Sam_Gao
NXP Employee
NXP Employee

If the boot was done by wrong fuse, generally, it is not possible to randomly program eFuses more than one time, eFuses are the One Time Programmable (OTP) bits.

Sam_Gao_0-1729482205275.png

 

0 Kudos
Reply