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

NRF51822 Steps for Upload Bootloader,Softdevice,Application

  Hello Supporter,

I'm going to develop one BLE nrf51822 based custom device. in which i want to use BLE DFU.

i am able to load DFU and APPLICATION with  KEIL uvison 5.

and i am able to load softdevice using openocd

as i done.

first i upload DFU using KEIL

than upload button less DFU application using KEIL

than Softdevice using Openocd

after that run the device ..it's working and it's advertising Buttonless DFU service.

But the problem is when i try to upload it using DFU device doesn't do in DFU mode nor able to upload new application.

so please tell me steps and ROM(Flash) configuration if needed .

and also tell me if any mistake done by me.

and other methods .if available.

i uploaded two pics one for nrf51.config file used with opencd.....

one for DFU rom address..

to verify

when i tried to combine all three file it gives conflict error like this as below link

devzone.nordicsemi.com/.../s310v2-mergehex-bootloader-hex-bootloader_settings-hex-conflict

Thank You,.

Parents
  • Hi,

    The linker settings shown in you screen-dump is incorrect, the first section of flash is actually reserved for the softdevice (memory layout). Recommend that you get a clean copy of the SDK, and use the default bootloader example as reference.

  • i didn't change anything i used dfu bootloader example as it is and sent you screenshot of it's rom location..so tell me what ROM configuration i should do.and for what i mean bootloader, softdevice and application.and make change in softdevice because i have only hex file for it.

    when i upload flash using opencd like following

    flash write_image softdevice.hex 0

    than loaded ....than after i load application

    flash write_image application.hex 0

    also loaded than i give

    reset run

    after this command device running and advertising service...it's works fine

    but when after this i upload dfu bootloader ..by keil uvision

    bootloader get uploaded but device stop to running and doesn;'t advertsing

    so what is the problem ..is dfu overwrite or something like that.

    i can't understand

  • The initial stack pointer for your bootloader is set to 0x20001418, which is in the softdevice's reserved memory. It's expected to be closer to 0x20003C00 with the default linker settings that I provided earlier. 

    Memory readout from the bootloader hex you sent: 

      

    Also noticed that the bootloader settings page at 0x3F000 is filled with invalid data. 

    I'm not sure what I have happened here. Could you share your project (remember to include necessary dependencies) ?

  • Hello Vidar , Currently i have not written any project code. my first goal is to make possible to enable DFU service than after i will write code and upload via DFU.so for now we can use any example as i gave you notification example. so i need your help for upload DFU and make it working...

    i already changedand compiled DFU settings as you gave earlier. i attached pic you can see it.and also sent you application settings

  • I see the device type has been changed from xxAC (default) to xxAA, which will reset the project configuration. The linker settings appear to be correct, but the .hex file you sent does not correspond with the configuration shown in the screenshot. 

  • one other thing i observed that when i upload application + softdevice ,than application working fine,but after when upload dfu..application stop working and when i again upload application again than also application not working .i must have to upload softdevice .once again if i uploaded dfu . it means dfu may overwrite softdevice or something like that or not. i'm not sure

  • Hello vidar thanks,now what to do?

    i'm not able to understand that you said"I see the device type has been changed from xxAC (default) to xxAA, which will reset the project configuration".

    if i changed it AA so what happen by this change change .and should i change it to default ?

    one other thing i used same  AA for application so it's working. so is it right or wrong?

    by default it comes with nrf51422..xxAC i'm using nrf51822 that's why i changed

Reply
  • Hello vidar thanks,now what to do?

    i'm not able to understand that you said"I see the device type has been changed from xxAC (default) to xxAA, which will reset the project configuration".

    if i changed it AA so what happen by this change change .and should i change it to default ?

    one other thing i used same  AA for application so it's working. so is it right or wrong?

    by default it comes with nrf51422..xxAC i'm using nrf51822 that's why i changed

Children
  • Changing the device type will reset the linker configuration to the default range for that device type. That is, use all available flash and ram. But it should have worked after you updated the settings to the correct values. For some reason, the ram allocation does not seem reflect the changes you made.  

    51822_xxAC and 51422_xxAC are identical except that the latter is licensed for use with the ANT protocol stacks (s2xx and s3xx). Suggest to try again with a clean SDK copy without making any changes to the configuration (you may add your own key set). Then verify that the initial stack pointer is >0x20002C00 

     

Related