Connecting NRF52840 chip to program via Platformio (arduino)

I am completely new to the Nordic chips. I have some knowledge with programming and creating a pcb for the ESP8266 and ESP32 but for my new project they consume too much energy. For using Bluetooth i see the Nordic chip could be amazing.

I have bought an NRF52840 module (Link to Aliexpress) and i would like to program it via Arduino IDE or VSCode Platformio.
Maybe i am a bit foolish but i see the board (EByte nrf52840) has D+, D-, VBS and GND connections.

Will i be able to just use a USB cable and connect the 4 wires to these pins? And upload code via VSCode or Arduino to the chip?
I see here the USB connections need some resistors and a capacitor and i can add these but maybe i need more than just this:


Also i read somewhere i need to burn the bootloader and have to use J-Link. That is right or can i do that any other way without J-Link? (Don't have this module) but i do have the ESP-Prog for example

PS: I am programming on a Mac, not sure if that makes any difference here

Parents
  • Hi,

    Will i be able to just use a USB cable and connect the 4 wires to these pins? And upload code via VSCode or Arduino to the chip?

    No. The nRF52 devices ship with an empty flash, so you need to do initial programming via SWD. If you then upload an Arduino bootloader you can use Arduino tools subsequently. Note that for details about the Arduino workflow I suggest you check Arduino forums as they will have more experience with it.

    If you on the other hand want to use the nRF Connect SDK (or older nRF5 SDK) or any other of the Nordic Semiconductor deliverables, this forums is the right place to ask.

  • Thank you for your reply. I also asked on the Arduino Forum but i think they don't know it because i didn't get any reply.

    The programming via SWD (uploading bootloader) requires JLink? Or can i use the ESP-PROG for example (it has ESP_TMS and ESP_TCK outputs). Sorry if i ask a stupid question.

    Do you have any information on how to search for the right information on how to start (SWD / uploading bootloader?)

    And if i want to use the nRF Connect SDK, which tools do i need for that?

    Thanks again!

  • Hi,

    Bbuster said:
    The programming via SWD (uploading bootloader) requires JLink?

    Yes and no. If you want to use nordic tools, you need a J-Link (or other Segger debugger). But technically any SWD debugger will do, though you may need to tweak a bit (or sometimes a lot) to make it work.

    Bbuster said:
    Or can i use the ESP-PROG for example (it has ESP_TMS and ESP_TCK outputs). Sorry if i ask a stupid question.

    From what I can see, the ESP-PROG supports SWD so it should be technically possible to use it, but I cannot say how you would do it (though I would guess you could use OpenOCD with the right configuration).

    Bbuster said:
    Do you have any information on how to search for the right information on how to start (SWD / uploading bootloader?)

    All we provide are related to J-Link. An easy way to obtain a J-Link debugger for development purpose is to buy an nRF52840 DK, for instance. Or see what Segger has to offer. Then refer to the documentation for the tools we provide. If using nRF Connect SDK, you can program directly from VS code. Of for a GUI, use nRF Connect Programmer. Or from the command line, use nrfjprog from nRF Command Line Tools.

    Bbuster said:
    And if i want to use the nRF Connect SDK, which tools do i need for that?

    From a HW perspective, a Segger debugger. Other than that, for SW tools I suggest you take a look at Getting started. I would also suggest looking at the Nordic developer academy.

Reply
  • Hi,

    Bbuster said:
    The programming via SWD (uploading bootloader) requires JLink?

    Yes and no. If you want to use nordic tools, you need a J-Link (or other Segger debugger). But technically any SWD debugger will do, though you may need to tweak a bit (or sometimes a lot) to make it work.

    Bbuster said:
    Or can i use the ESP-PROG for example (it has ESP_TMS and ESP_TCK outputs). Sorry if i ask a stupid question.

    From what I can see, the ESP-PROG supports SWD so it should be technically possible to use it, but I cannot say how you would do it (though I would guess you could use OpenOCD with the right configuration).

    Bbuster said:
    Do you have any information on how to search for the right information on how to start (SWD / uploading bootloader?)

    All we provide are related to J-Link. An easy way to obtain a J-Link debugger for development purpose is to buy an nRF52840 DK, for instance. Or see what Segger has to offer. Then refer to the documentation for the tools we provide. If using nRF Connect SDK, you can program directly from VS code. Of for a GUI, use nRF Connect Programmer. Or from the command line, use nrfjprog from nRF Command Line Tools.

    Bbuster said:
    And if i want to use the nRF Connect SDK, which tools do i need for that?

    From a HW perspective, a Segger debugger. Other than that, for SW tools I suggest you take a look at Getting started. I would also suggest looking at the Nordic developer academy.

Children
No Data
Related