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

DFU not working on S332 2.0 SDK12 . Help me setting Target IROM1 and IRAM1?

Hi 

   I am trying to implement DFU to my project. I have done all the steps to generate packages,  private and public keys etc. My program now starts at dfu and I can upload the package to nrf52 but it then get stuck to (Jump to 0x0029000).

Can anyone help me target setting on keil? Thanks

  

Parents
  • Hi Stark,

    Could you try to test updating an example in our SDK (you need to configure it so it works with S332) instead of your application, just to make sure that DFU works properly ?  You can also start with testing with a simple application to blink an LED. 

    I assume your app works if you don't flash the bootloader ? 

  • Hi Hung,

                 I got successful in running dfu on s132 but struggling on s332. I think its IROM1 and IRAM1 settings for dfu bootloader. Currently settings are

    IROM1: 0x75000 and size: 0xB000

    IRAM1: 0x20002E00 and size: 0xD370 

    I am working on nrf52832 512k chip. 

    Is there any way to find out the correct IRAM1?

  • Hi Stark, 

    I have been testing here and actually found a bug in the bootloader (after 4 hours :( ). We used wrong size of data when doing nrf_dfu_flash_store() inside nrf_dfu_app_continue() in nrf_dfu_utils.c. It should be like this: 

    ret_val = nrf_dfu_flash_store((uint32_t*)target_addr, (uint32_t*)src_addr, cur_len/sizeof(uint32_t), NULL);

    It may not be related to the issue you are having now, but it's worth to try again. 

    Could you please do the same test (reading out hex files) with the following images. Please flash the softdevice and bootloader that's included in this .zip file and update blinky and then update hrs. 

    0572.DFU_TEST.zip

  • Thanks for your time Hung. Much appreciated.

    I have attached the tests for you. Also I have tried my app on this SD + bootloader and it actually initialise the ble and ant but it restarted after pStorage init and then jump back to dfu bootloader. Definitely improvement :-)

    New blinky package works fine and when I restart the device it jump straight to app again unlike before it start again from dfu bootloader.

    New hrs package didn't work.

    test1-1.zip

  • Hi I have just checked the hrs_package again and its running ok. I have attached the flash read for this again. Both Packages you sent working ok. 

    test3-1.hex

  • Glad to hear Wasil, this meant a normal application should work fine. 

    Could you try to update one of the application (for S332) in the SDK with your own bootloader ?  (with the fix I proposed)

    Or you can use the image of the hrs example that I attached here. 

    If that works with your bootloader we would need to look into your application to check why it crashed at pstorage init. 

    Do you do any flash operation that modify the application firmware ? Can you step into the code and check why pstorage init crashed ?

    If you can't get to pstorage init and it's stuck at DFU bootloader, you can check and send me the RTT log of the bootloader. 

  • Hi Hung

    I have checked hrs example that you sent with my bootloader and same result. I did make a change in nrf_dfu_utils.c but same results. 

    I have also tried with new s332 hex you sent me but no Luck :-( 

Reply Children
No Data
Related