mcuboot enter with button

hi support team,

i was testing smp_svr, i want to add button to my application that once i press the button and reset, the device will stay in mcuboot (serial port mode)and i can program my device with serial port, liking our old sdk bootloader----examples\dfu\secure_bootloader\pca10040_uart , how can i accieve this function?

it it more like how our thingy53 works.

 i don't know how to add button or gpio to my project.

Thanks!

Regards,

William.

Parents
  • Sorry Siguard,

    i was testing nrfutil device program --firmware command. for now i am able to upgrade thingy91 as documents described.

    the documents is : One tool to rule them all: nRF Util becomes a unified command line utility 

    but, when i was testing 52840 peripheral uart, i am not able to upgrade 52840 with serial_recovery mode in mcuboot, or smp over uart in application. i don't know if it was code problem  or our tool is only supporting thingy91?

    however for the mcumgr, i can upgrade successfully. i don;t know the difference.

    Regards,

    William.

  • nrfutil is searching for VID and PID of the device to match a pre-set number of PIDs.
    So you have three alternatives

    • Use another tool for the programming. See here for a list
    • add PID and VID to your nRF52840
    • nrfutil device x-execute -o program --args 'firmware[file]=./dfu_application.zip' --device-filter 'serialNumber=4254EFB4D8746FF6' --override-traits mcuBoot --inject 'mcuBoot[vcom]=0
  • Hi Sigurd,

     i was still not able to program device as below: however mcumgr is working after nrfutil device program fails

    C:\Users\William>nrfutil device x-execute -o program --args 'firmware=C:\ncs\v2.6.0\test\peripheral_uart\build\zephyr\dfu_application.zip' --device-filter 'serialNumber=683014854' --override-traits mcuBoot --inject 'mcuBoot[COM23]=0'
    Error: No devices with requested filter found

    C:\Users\William>>mcumgr -c myCOM image upload C:\ncs\v2.6.0\test\peripheral_uart\build\zephyr\app_update.bin
    '-c' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\William>>mcumgr -c myCOM image upload C:\ncs\v2.6.0\test\peripheral_uart\build\zephyr\app_update.bin
    '-c' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\William>mcumgr conn add myCOM type="serial" connstring="dev=COM23,baud=115200,mtu=256"
    Connection profile myCOM successfully added

    C:\Users\William>mcumgr -c myCOM image upload C:\ncs\v2.6.0\test\peripheral_uart\build\zephyr\app_update.bin
    6.31 KiB / 219.90 KiB [=>------------------------------------------------------------------] 2.87% 2.38 KiB/s 01m29s
    C:\Users\William>

    it is really hard to findout what's wrong in my command.

    snr 683014854 should be correct as i can select this jlink to program:

    C:\ncs\v2.6.0\test\peripheral_uart>west flash --recover --snr 683014854
    -- west flash: rebuilding
    [0/4] Performing build step for 'mcuboot_subimage'ninja: no work to do.

    [3/3] Completed 'mcuboot_subimage'
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Recovering and erasing all flash memory.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.

    Regrads,

    William.

  • If the command does not work, i think I will just suggest that you use one of the other tools for now.

    I spoke to our nrfutil developers, and it does not officially support SMP yet

Reply Children
Related