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

FLASHING THE HEX FILE

in my application i am using the hrs application and added dfu and uart service to it.

Q1)how dfu service works?

For my board i removed the total flash so steps i have used is for bring up is

1.flashing bootloader using jlink

2.flash softdevice using jlink

3.dfu the application

now if tried flashing my appliation using jlink for first time it is not working 

now after dfu was done i am able to modify the application with out any problem with jlink 

Q2)why flashing of application using jlink is not working for the first time and and why working after dfu?

Parents
  • When the bootloader start it will check the bootloader settings page to see if it has a valid application available in bank 0. If it does the bootloader will (unless you are holding a button or using the buttonless service) start the application. When you perform DFU to send the application to the device, the bootloader will update the settings page so that the application will be valid. If you want to flash an application to the device and have the bootloader running (useful both in development and production) you will have to generate a settings page and flash it to the device. nrfutil supports the command nrfutil settings generate which will create a settings page valid for the application you send in as an argument. See documentation in the link above for explanations and an example of use.

    You will typically have a small script or some command line input which generates the settings page from the application hex and then flashes everything you need to the device. It just makes development simpler when you don't have to do each step manually every time you want to flash a new firmware.

    Best regards,
    Rune Holmgren

Reply
  • When the bootloader start it will check the bootloader settings page to see if it has a valid application available in bank 0. If it does the bootloader will (unless you are holding a button or using the buttonless service) start the application. When you perform DFU to send the application to the device, the bootloader will update the settings page so that the application will be valid. If you want to flash an application to the device and have the bootloader running (useful both in development and production) you will have to generate a settings page and flash it to the device. nrfutil supports the command nrfutil settings generate which will create a settings page valid for the application you send in as an argument. See documentation in the link above for explanations and an example of use.

    You will typically have a small script or some command line input which generates the settings page from the application hex and then flashes everything you need to the device. It just makes development simpler when you don't have to do each step manually every time you want to flash a new firmware.

    Best regards,
    Rune Holmgren

Children
No Data
Related