This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to upload a hex file to external qspi flash by nrfjprog

Hi Sir 

Is it possible write a hex file to external QSPI flash by nrfjprog ? if yes, please tell me what's the command ?  Thank you.

ps, the hex file is data, not firmware.

  • Hi,

    Yes, from the help section of nrfjprog tools:

    --memwr <addr> --val <val> Writes to the provided
    address in memory with the help of the NVM
    Controller or, if your device is equipped with a
    QSPI peripheral and the address to write belongs
    to the XIP region, with the help of the QSPI
    peripheral to an external memory device. To
    determine if an external memory device is present,
    nrfjprog checks the MemSize parameter from
    QspiDefault.ini file or the QSPI configuration ini
    file that is given with the --qspiini option.
    The first address of the region is considered as
    address 0 of the external memory device. If the
    target address is flash (either internal or in the
    external memory device) and not erased, the
    operation will fail. This command can be combined
    with the --verify operation.

    Best regards

    Jared

  • Could you give me a example ? if I have a hex file. Thanks. 

  • If you want to write to a certain value at a specific address you can use --memwr. If however you have a hex file you can use: 

    nrfjprog --program file.hex --chiperase

    The pins that are used are the ones specified in the QspiDefault.ini file. Make sure that the address that are written to in the hex files is within the XIP region.

    Best regards

    Jared

Related