Programming nRF52832 custom board using nRF52840DK via SWD

Hi,

I had a problem while programming my custom nRF52832 board using nRF52840DK. I am using this connection that I found in the Nordic Devzone forum. I am trying to program my custom board using nrfjprog. I can see my board when I print the nrfjprog --ids and --deviceversion but I cannot see my custom board. I try different connections that I found in the forums but this is the most reliable one for my project. 

This the connections that I applied:

Custom nRF52832 board     |    nRF52840DK

VDD                                      |    VDD_nRF

                                             |    VDD_nRF' shorted with SWDSEL (as far as I understand from the forums it is shorted because to program an external device connecting to the DK)

SWDIO                                 |    SWDIO

SWDCLK                              |    SWDCLK

GND                                     |     GND

  • Are there any suggestions for that?
  • Even if the connections are true, how can I understand my custom board recognised by nRF52840DK?
  • How can I program my custom board using nrfjprog if the connections are provided correctly?

Thanks for your answers. Have a great day to you all.

Parents
  • What version is the nRF52840 DK you have? The connection you have listed should work with the latest HW version (3.x.y) but won't work with older kits. If you have the large debugger chip (the big chip just above your GND line) then you need to have one additional signal that connects the "GND DETECT" pin to GND when you plug in your external target. If you have the small debugger (small QFN package) then your connection shoudl work as far as I can see.

    Note: the kit will always show up as the nRF52840 DK, you can only see it is targeting the external device by seeing it has a different memory size than the nRF52840.

  • Hi PaKa thanks for your reply.

    The DK that I use is the nRF52840 3.0.0 version. I have attached my development board. 

     

    As you said, I think I am using the newer version. So, no GND_DETECT is specified in this version.

    • How can I double-check the memory size (any nrfjprog command)?
    • Is there any easiest way to flash the external device instead of nrfjprog?

    I am coding my device from Segger Embedded Studio. Again, thanks for your reply. 

  • Not sure about the comman line interface as I always use nRF Connect for Desktop. This does use the CLI so this is supported in the CLI, did you look through tha commands?

  • Could you provide a roadmap to flash my program into the custom board using nRF Connect for Desktop?

    Which steps should I follow after when I do the HW connections? 

    Thanks for your reply.

  • Follow the HW user guide for the nRF5 DK (updated to match the new OBD), check that you have the correct VDD level on your board and just use nRF Connect for Desktop to program the target, should all be supported today.

  • Sorry for asking questions again and again. 

    • Failed "reading readback protection status for application core". Error: code: 1, description: Generic, message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)
    • Failed with exit code 1. One or more batch tasks failed: - [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1), code: Generic. Message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)

    I do the connections and try to read from the nRF connect for the desktop. I got this error. What might be causing the problem? Could it be that the debugger on the nRF52840DK does not recognize the nRF52832 chip?

Reply
  • Sorry for asking questions again and again. 

    • Failed "reading readback protection status for application core". Error: code: 1, description: Generic, message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)
    • Failed with exit code 1. One or more batch tasks failed: - [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1), code: Generic. Message: Batch task protection-get failed, [Probe] Device error: Failed to write DebugPort register 2: Unknown Error in J-Link DLL (error code =-1)

    I do the connections and try to read from the nRF connect for the desktop. I got this error. What might be causing the problem? Could it be that the debugger on the nRF52840DK does not recognize the nRF52832 chip?

Children
No Data
Related