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

What is next step to do after flashing hex files of nRF examples

Hello Everyone need your help.

I am using three nRF52840 dongles and have flashed hex file of an nRF example (Ble_Blinky). i want to know whether the hex file is really flashed into the nRF52840 dongle.

I am getting output as: The LD2 led which is built-in on dongle is continuously blinking Red, Green and Blue. So can you tell me whether this is the required output.

Parents
  • Hi!

    This seems to be the expected behaviour of the ble_app_blinky, yes.

    The nRF52840 Dongle can be programmed through the built-in USB bootloader.
    To program the Dongle, it must be in bootloader mode.
    You can enter bootloader mode either by;
    - Triggering the nRF52840 USB DFU endpoint
    - Or pressing the RESET button on the Dongle (See picture below).

    When you have programmed the Dongle using the programmer app the dongle will exit bootloader mode. That is why you get the "Reopen device error".

    Let me know if you have any further questions.

    Best regards,
    Joakim.

  • So after flashing the dongle with required program the dongle exits bootloader mode. So how will I come to know the dongle is advertising or not. Also after flashing neither of the two Led's glow. Also should I have to power the dongle externally?

  • Hi again.
    I think I was a little hasty with my last answer. Let me correct myself:

    First of all;
    LD2 blinking Red/Green/Blue is the expected behaviour of the peripheral blinky example, found in sdk_root/examples/peripheral/blinky.
    From the screenshot in your original question, I can see that this is the example you are using due to the blinky_pca_10059_mbr.hex in the programmer app.

    For the ble_app_blinky, found in sdk_root/examples/ble_peripheral/ble_app_blinky, LD2 blinking Red/Green/Blue is not the expected behaviour.
    When programming the ble_app_blinky example to your dongle (Precompiled hex-file can be found in sdk_root/examples/ble_peripheral/ble_app_blinky/hex/ble_app_blinky_pca10059_s140.hex), LD1 should be lit.

    After I flash the ble_app_blinky hex-file file to my dongle I see that LD1 is lit, indicating that it is advertising. I use my smartphone with nRF Connect to scan for the dongle. I can see that it is advertising, and I can connect to it. After connecting I see that LD1 is turned off and LD2 is lit, indicating that it is connected.

    After connecting, I can see the LED Button Service. If I write 0x00/0x01 to the Nordic Blinky LED characteristic, I can see that LD2 is changing color.

    Nimish said:
    Also should I have to power the dongle externally?

     Not sure if I understand what you mean by this. The dongle is powered by the USB on the computer. No need for an external power supply.

    Nimish said:
    Also after flashing neither of the two Led's glow.

     In your original question you said that LD2 was blinking Red/Green/Blue. Is that not the case?

    Best regards,
    Joakim

Reply
  • Hi again.
    I think I was a little hasty with my last answer. Let me correct myself:

    First of all;
    LD2 blinking Red/Green/Blue is the expected behaviour of the peripheral blinky example, found in sdk_root/examples/peripheral/blinky.
    From the screenshot in your original question, I can see that this is the example you are using due to the blinky_pca_10059_mbr.hex in the programmer app.

    For the ble_app_blinky, found in sdk_root/examples/ble_peripheral/ble_app_blinky, LD2 blinking Red/Green/Blue is not the expected behaviour.
    When programming the ble_app_blinky example to your dongle (Precompiled hex-file can be found in sdk_root/examples/ble_peripheral/ble_app_blinky/hex/ble_app_blinky_pca10059_s140.hex), LD1 should be lit.

    After I flash the ble_app_blinky hex-file file to my dongle I see that LD1 is lit, indicating that it is advertising. I use my smartphone with nRF Connect to scan for the dongle. I can see that it is advertising, and I can connect to it. After connecting I see that LD1 is turned off and LD2 is lit, indicating that it is connected.

    After connecting, I can see the LED Button Service. If I write 0x00/0x01 to the Nordic Blinky LED characteristic, I can see that LD2 is changing color.

    Nimish said:
    Also should I have to power the dongle externally?

     Not sure if I understand what you mean by this. The dongle is powered by the USB on the computer. No need for an external power supply.

    Nimish said:
    Also after flashing neither of the two Led's glow.

     In your original question you said that LD2 was blinking Red/Green/Blue. Is that not the case?

    Best regards,
    Joakim

Children
  • Trying to recreate this process with the same setup as Nimish. I insert the dongle into the PC USB port and open nRFconnect v2.5.0. I run the Programmer(experimental) and press the reset button on the dongle and LD2 flashes slowly, maybe a Hz, color red. I then compile the project within armgcc as the PCA10059 folder. Within the programmer I select the nRF52840_xxaa.hex for the ble_app_blinky and the programmer places it in the files section with addresses 0x0002C268-0x00026000. When I select the Write all to devkit, LD2 quits flashing, the PC has disconnected the device, but nothing else is occurring. I suspect the bootloader has not jumped to the appropriate address to start the application.   I can insert the device in a powered USB port but nothing is still occurring.

  • That is very strange. I have no problems doing this.

    Are you sure you flashed the correct softdevice as well as the application?

    Regards,
    Joakim

Related