Flash arduino code (hex file) to Custom board based on nRF52810

I have written code based on Bluefruit nRF52 feather board in Arduino IDE. I need help to know is it possible for me to flash same code to my custom board based on nRF52810/ nRF52832.

Note : I'm not asking for code conversion from nRF52832 of Bluefruit Feather board to custom board nRF52810. I need to know can I use nRF52DK  to program my custom  board with arduino hex file?

If not is there any way to achieve same?

Parents
  • Hello,

    Please see the Debug Out section of the nRF52 DK documentation for a thorough explanation of how to use the nRF52 DK to program your custom board / external SoC.
    Your connections to your external board should look like this:

    A convenience tip: I would recommend that you program your nRF52 DK with a blinky application (or something similar) so that when you use it to program your external SoC you can be sure that the programming target actually was the external SoC (because the Blinky application will be unaffected by your programming of the external SoC).

    Best regards,
    Karl

  • Hello,

    I have got my custom PCB and nRF52840_DK. I'm trying to program the custom board, flashing through VSCode Blinky. But it only changes the code in the nRF52DK, not in the custom board.

  • Yes, if the Blinky application on the DK got overwritten it means that the DK was the target of the programming, not the custom board.

    Please make sure that you have all the same connection in your setup as detailed in the image shared earlier.
    Have you gotten a schematic review done on your custom board prior to its production? If you create a ticket here on DevZone with the schematics we can review your integration of the nRF onto your board, to see that everything looks alright.

    Best regards,
    Karl

  • Yes, I have my schematic reviewed here only before production.

    Here are the private ticket IDs : 

    • Case ID: 297698
    • Case ID: 299051

    The image I attached earlier, shows the same pins connection as in the reference image you have shared.

    I have flashed the code with VS code, not the Programmer software. So I want to know, do I have to use only Programmer software for custom board flashing?

  • KKaushik said:
    The image I attached earlier, shows the same pins connection as in the reference image you have shared.

    It seems that you do not have the split from VDD to include VTG in your connections, and you do not have GND detect connected either, which is likely why your are unable to program the target.
    Please connect these so that your connections match the image I shared earlier exactly.

    KKaushik said:
    I have flashed the code with VS code, not the Programmer software. So I want to know, do I have to use only Programmer software for custom board flashing?

    No, you can use any programmer as the programmer will tell the debugger how to flash it, and the debugger will decide which target it should flashed based on the availability of the SWD interface.

    Please remedy the connections, and let me know if you are able to program the target as expected.

    Best regards,
    Karl

  • Now when I flash the code it doesn't reset the code on nRF52840 DK. So I hope it uploads the code in custom PCB.
    But I haven't given any testing led on the custom board. So is there a way to serial read from pins P0.5 & P0.8?

  • KKaushik said:
    Now when I flash the code it doesn't reset the code on nRF52840 DK. So I hope it uploads the code in custom PCB.

    That's good!
    If the debugger reports that the flashing was successful, and the DK program is not overwritten, then you know that the application was written to the external target.

    KKaushik said:
    But I haven't given any testing led on the custom board. So is there a way to serial read from pins P0.5 & P0.8?

    On the external board?
    P0.05 and P0.08 can be used as GPIOs, so this will depend on how you have routed the pins on your external board and how they are configured in your application.

    Best regards,
    Karl

Reply
  • KKaushik said:
    Now when I flash the code it doesn't reset the code on nRF52840 DK. So I hope it uploads the code in custom PCB.

    That's good!
    If the debugger reports that the flashing was successful, and the DK program is not overwritten, then you know that the application was written to the external target.

    KKaushik said:
    But I haven't given any testing led on the custom board. So is there a way to serial read from pins P0.5 & P0.8?

    On the external board?
    P0.05 and P0.08 can be used as GPIOs, so this will depend on how you have routed the pins on your external board and how they are configured in your application.

    Best regards,
    Karl

Children
Related