Uart DFU failed

Hi 

I have a project as the follow 

What I have done:

1. Compiled app.hex ( Configured with my board), works fine.

2. Compiled bootloader.hex ( Configured with my board)

3. Generate app_setting with nrfUtil

4. Merge app, app_setting, bootloader and flash to target board

5. Compile app again, and generate zip file with nrfutil.

6. Convert zip file to bin file and upload to web. (xxx.yyy.zzz/app_2_dfu.bin)

7. nRF9160 download app_2_dfu.bin successfully and ready to do DFU

But it failed. Please see the bellow picture

I understand the payload between DFU host(here is nRF91) and target(here is nRF52810)

First, host ping target and get response

Then, send command to target to enter bootloader

Then, wait a moment, host ping target to make sure target is bootloader mode

and then ..... it seem everything is OK,

But, when host send operation 0x03, which means to get CRC check, but the target don't have any response. 

I looked into the source code, if there is error, target should send error code back to host. But unfortunately, nothing, just like the target didn't receive 0x03.

Further, I changed both side hardware flow control ON and OFF, both don't work.

I set breakpoints for all NRF_DFU_OP_CRC_GET in bootloader. But none of them executed.

I set breakpoints for such as NRF_DFU_OP_OBJECT_CREATE in bootloader, it can stop at the breakpoint as expected.

Please help me.

Parents
  • Hi,

    Nordic does not provide any DFU master implementation for running on a nRF device, so I am not sure what you are using here.

    Can you elaborate on which bootloader you use on the nRF52 device (based on what you write I assume it is a nRF5 SDK based)? And then, can you share details about your DFU master implementation and how you test it?  Please elaborate.

  • Hi,

    I looked into the bootloader source code, find that when create new data object, the flash should be erased. But actually, the flash keep unchanged even target response with 01 01 (create object success) and 04 01(execute success).

    How do I know that the flash page is not erased?

    I restart the system by power off power on, I can still find the BLE and connect it and do some operations. If the application page is erased, how the application can work normal?

    Further more, I switch on the single bank dfu feature in sdk_config, it return 04 04 error code, mean that there is no enough memory. I don't understand, if single bank dfu feature is enabled , it should replace the current application, why it says not enough memory?

Reply
  • Hi,

    I looked into the bootloader source code, find that when create new data object, the flash should be erased. But actually, the flash keep unchanged even target response with 01 01 (create object success) and 04 01(execute success).

    How do I know that the flash page is not erased?

    I restart the system by power off power on, I can still find the BLE and connect it and do some operations. If the application page is erased, how the application can work normal?

    Further more, I switch on the single bank dfu feature in sdk_config, it return 04 04 error code, mean that there is no enough memory. I don't understand, if single bank dfu feature is enabled , it should replace the current application, why it says not enough memory?

Children
No Data
Related