Update firmware via SPI

According to the way our production and the way we update the firmware.

I will need a bootloader for nrf5340, so I can update the firmware via SPI.

What will be the best example code to use for this kind of project?

We can use JLINK the first time to download the bootloader.

Br, F Nielsen.

Parents Reply Children
  • Hi Sigurd

    Thanks for your fast answer.

    You have answered my question.

    Our products have one main processor, all update of the product goes through this processor. The processors internally in the product use either SPI or I2C to communicate to the main processor. Have not decided yet what we will do about nrf5340, but thanks for your effort.

    Br, Frede.

  • Hi

    Sigurd Hellesvik said:
    For Serial Recovery, I am testing if it will work for the nRF5340 now, and will update you on what I find tomorrow.

    Since you got what you needed, I thought that I needed not hurry with this.

    But I figured it out today.

    Our Machine Learning Sample implements Serial Recovery for nRF5340, so you can use this with mcumgr to perform DFU over serial.
    Use the following commands to update both cores after resetting the device into Serial Recovery Mode(reset when holding button1):

    mcumgr --conntype=serial --connstring="dev=/dev/ttyACM2,baud=115200,mtu=512"image upload -n 3 build/zephyr/net_core_app_update.bin
    #wait min. 2 minutes to allow Network Core to copy image
    mcumgr --conntype=serial --connstring="dev=/dev/ttyACM2,baud=115200,mtu=512" image uploadbuild/zephyr/app_update.bin
    mcumgr --conntype=serial --connstring="dev=/dev/ttyACM2,baud=115200,mtu=512"image list
    mcumgr --conntype=serial --connstring="dev=/dev/ttyACM2,baud=115200,mtu=512" reset

    So in case you need it later, and for reference for others, I will leave this explanation here.

    Regards,
    Sigurd Hellesvik

Related