How to program nRF52840-QFN48 chipset using nRF52840-DK?

Hi,

I want to program a nRF52840-QFN48 package chipset which does not have USB pins. I gone through several articles on the forum but nothing work for me.
Many of them suggested that you need J-Link programmer or nRF52840-DK can also work. I have nRF52840-DK with me. I made a connections as follows:

nRF52840-DK nRF52840-QFN48
SWDIO SWDIO
SWDCLK SWDCLK
VDD[3.3V] VDD [3.3V]
GND GND

I have generated to source code .hex file using arduino IDE and tried both programming mode i.e. 1. command line [using nrfjprog] and 2. nRF Connect for Desktop to flash the nRF52840-QFN48 using nRF52840-DK board.

Please suggest me if my approach is not proper or if I was missing anything.

Thanks and Regards,
Kapil S

Parents
  • Hi,

     

    Your connections are correct, but please note that the "VTG" pin needs to be connected to the VDD.

    This is because that is a sense-pin for the nRF52840-DK to switch to that specific programming port.

     

    Could you share any logs from nrfjprog? "nrfjprog --recover -f nrf52 --log" should create a .log file which you can upload here.

     

    Kind regards,

    Håkon

  • Hi Håkon

    Thank you for your reply. I made the changes as you suggested above.

    Please find attached a .log file for your reference.

    C:\Users\Kapil>nrfjprog --recover -f nrf52 --log
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.


  • That shows a successful connection, meaning nrfjprog was able to successfully erase the device. You can try to program a sample now and see if that works?

     

    Kind regards,

    Håkon

  • Thanks for confirming that up to this everything is OK. I will check by program a device  and let you know the status.

    Thanks and Regards,
    Kapil S

  • Hi,

    I have uploaded the LED blinking code successfully on my nRF52840-QFN48 chipset. But I didn't observe LED flashing on my board. I checked the memory content using "nRF-Connect-Desktop" tool. I am not sure what are the cause and how to test it further to resolve an issue.

    Please guide me if you have any idea or suggestions.

    Regards,
    Kapil S.

  • Hi,

     

    Does your custom board have external components for DCDC?

    Does it use an external 32 kHz source?

    See here on how to configure this in NCS:  RE: Enabling LDO or DCDC on nrf connect sdk 

     

    Kind regards,

    Håkon

  • Hi Hankon,

    Thanks again. I successfully program my nRF52840 QFN48 chipset using nRF52840-DK. The problem is related to pinmap. I changed the pin configuration from nRF Device Tree tool and it works! But I have not found the device tree .dts file for nRF52840 QFN48 pin package. Can you suggest me where can I get that? or do I need to create my own as per the datasheet pin layout?

    Thanks and Regards,
    Kapil

Reply
  • Hi Hankon,

    Thanks again. I successfully program my nRF52840 QFN48 chipset using nRF52840-DK. The problem is related to pinmap. I changed the pin configuration from nRF Device Tree tool and it works! But I have not found the device tree .dts file for nRF52840 QFN48 pin package. Can you suggest me where can I get that? or do I need to create my own as per the datasheet pin layout?

    Thanks and Regards,
    Kapil

Children
  • Hi Kapil,

     

    Glad to hear that the programming sequence is now working.

    KapilS said:
    But I have not found the device tree .dts file for nRF52840 QFN48 pin package. Can you suggest me where can I get that? or do I need to create my own as per the datasheet pin layout?

    nRF52840 QIAA is the variant you're after. After going through the "create board" in vscode, you can manually add to the custom board that you created (the .dts and also include a pinctrl file).

    You can use the nrf52840dk_nrf52840 as a base for your custom board, and change that to match your layout and schematic.

     

    Kind regards,

    Håkon

Related