Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

OTA over serial failure| sdk 15.2

Hello Everyone,

I am using nrf52832 and sdk 15.2 for ota over serial. I have made bootloader for OTA over UART and tested same with nrfutil using my dfu package file. firmware is upgraded successfully and  working fine.

Now I need to upgrade firmware using host MCU. I tried sending dfu package file( .zip ) to nrf52832 over UART using slip librairy to upgrade firmware but it is not working.

Is there any compulsion to send Ping packet, PNR, MTU Packet, init packet, application and bootloader separately over UART?

Can we send directly dfu package created through nrfutil to nrf52832 from other MCU over UART?

Kindly suggest me right approach.

Parents
  • Hello,

     

    Now I need to upgrade firmware using host MCU. I tried sending dfu package file( .zip ) to nrf52832 over UART using slip librairy to upgrade firmware but it is not working.

     From this, I interpret that you want to drag'n'drop from a computer, isn't that right? Is that the final way you want to do it? Or do you want to program the nRF From a microcontroller on a PCB? 

    What HW are you running on? Is it a DK, or is it a custom PCB?

    BR,

    Edvin

  • No, I don't want drag and drop from computer. I want upgrade nrf from other MCU through UART. I have custom PCB. Kindly help for the same.

  • Hello,

    I am sorry. I didn't see this until now. When a message is marked as a "verified answer", it no longer pops up in the queue. Did you manage to generate the init packet?

    Do you know why the init execute command fails? Where was it "done before"? I didn't understand that part. 

    Could the problem be that you don't use Flow Control on the UART? Or do you use flow control?

    BR,
    Edvin

  • Hi,

    I have generated init packet. 

    I tried sending init packet and app file. that time init packet executes successfully but app file not due to some reason.now want to send again init packet and app file but init packet does not executes because it was done before. I need to execute this init packet from crash now again. is there any command to set bootloader to recieve init packet from crash again.

  • One way to reset the device is to call a systemreset from the sourcecode if the second init (application image) fails. Depending on whether you have a valid application or not you may have to set the correct reset register (the way that you set it to get it to run DFU mode instead of the application) in the first place. 

    The way this is typically done is to write to the NRF_POWER->GPREGRET register.

    Please see how this register is checked in dfu_enter_check() in nrf_bootloader.c:

        if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &&
           (nrf_power_gpregret_get() & BOOTLOADER_DFU_START))
        {
            NRF_LOG_DEBUG("DFU mode requested via GPREGRET.");
            return true;
        }

    So this register has to be written before the reset (you can use bootloader_reset() to reset the bootloader).

    But perhaps it would be more interresting to know why the execute command doesn't work? Do you use HWFC? At what rate are you sending the packets?

  • Let me explain in briefly.

    I first sent two files( Baud:115200, HWFC Disabled )

    Init packet -> executes successfully

    application file -> does not executes( I am downloading file from server then sending file to nrf through serially so if network failor occurs it fails)

    then I send two files again( Baud:115200, HWFC Disabled )

    Init packet -> does not executes

    application file -> does not executes

Reply
  • Let me explain in briefly.

    I first sent two files( Baud:115200, HWFC Disabled )

    Init packet -> executes successfully

    application file -> does not executes( I am downloading file from server then sending file to nrf through serially so if network failor occurs it fails)

    then I send two files again( Baud:115200, HWFC Disabled )

    Init packet -> does not executes

    application file -> does not executes

Children
Related