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

is it possible to Run the nrf51822 DFU program on nrf51422 new version ?

Hi All ,

I am trying to run the nRF51822 DFU sample code(SDK5.1) on nRF51422 new chip set(QFAAE0).but when i am running on nrf51422 i am getting below message and able to jump in bootloader but this is the error :

Load "C:\Keil\ARM\Device\Nordic\nrf51822\Board\nrf6310\device_firmware_updates\bootloader\arm\_build\bootloader.axf"

  • JLink Info: J-Link: Flash download: Flash programming performed for 1 range (1024 bytes) ***JLink Error: Programming failed @ address 0x10001000 (block verification error) Verification failed @ address 0x10001000
  • JLink Info: J-Link: Flash download: Total time needed: 0.133s (Prepare: 0.110s, Compare: 0.001s, Erase: 0.009s, Program: 0.002s, Verify: 0.000s, Restore: 0.009s) BS \bootloader../main.c\234

i used the nrfjprog for this boot loader flashing: with arguments :--program "#H" --verify

And my setting in keil are like this: IROM1 Start: 0x3c800 size : 0x3800 , IRAM1: 0x20002000, size :0x2000 in DFU project : i changed this : #define CODE_REGION_1_START 0x00020000

I have a app on 0x20000 already flash via keil.

please suggest me what i am missing ?

Thanks Robin

  • It seems that this happens since the bootloader tries to write to the UICR settings, but Keil tries to flash the bootloader using it's builtin flash algorithm instead of nrfjprog. Can you please double check that the download settings look like the attached screen shot, i.e. that "Use external tool" is selected?

    Also, please try to do an erase all and flash the S310 softdevice again before trying, to verify that UICR hasn't already been set to some erroneous value.

    Edit: After looking at your project, I noticed I overlooked an error in your original configuration. S310 reserves 0x2400 B RAM, not just 0x2000. You must therefore adjust your RAM settings to 0x2400 and size 0x1C00. This could very well be the cause of your timeout problem.

    You must also change the include path of your project to point at the S310 header files instead of the S110 ones. This you do by changing the include path in the Target Options, on the C/C++ tab.

    Finally, I'd recommend you to not use flow control with the RS232-converter on the motherboard, and to disable this, you must change the HCI_SLIP_UART_MODE in hci_transport_config.h to APP_UART_FLOW_CONTROL_DISABLED.

    bootloader-programming.png

  • Thanks for the reply Ole Morten, i tried your steps for nrfjprog given in the pic: but still have problem.

    I am attaching this project here. And these are the things , which are working or not working for me.

    1. I am still getting the above error. when i jump to debug mode. please check the project setting.

    2. I flashed the default ble_ant app on 0x20000 and then in DFU main program just jump to my app , and it is working fine .

    3. i am trying to make single and dual bank HCI-UART DFU work , but when i transfer the file from window 7 pc there is always a timeout , i do not know why ?

    please have a look on the project setting and give me your suggestion , and some test instruction, to test this DFU program. my final target is to transfer the hex file form main MCU via UART.

    thanks in advance Robin

    bootloader.rar

    Screenshot 2014-03-05 18.43.11.png

  • Sorry, I didn't understand that you got the error only when entering debug mode. This is unfortunately unavoidable, due to the way flashing works.

    I've also edited my answer above with 3 problems I could see with your code, and when fixing those, things seem to work.

  • completed some time before by writing a simple loader via UART, following are the step . if some one want to do it: Reference this project : github.com/.../nrf51-uart-bootloader project: github.com/.../nrf51422-bootloader performance: 5kb/sec approx with 115200 baud rate.

Related