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

Flashing a 3rd party NFR52832 with ST link V2 on Eclise?

Hello,

I am in a little bit of trouble here trying to flash a 3rd party module that is mounted on a custom PCB I made with the SWD pins exposed for programming.

I've been using it with the Arduino IDE and the st link V2 so far(Thus flashed softdevice S132 on it already) but I want to make the transacting from it sins it lacks capabilities. any way I know it works in term of hardware.

Now I'm not interested in wasting my money on buying the Segger J link so I want to use the ST link V2 so far I've followed this tutorial: devzone.nordicsemi.com/.../ up to the point of "Flash download" build the blinky code successful and waiting to see how you flash the chip with it.

Does anybody have any experience with it? thanks for your time.

  • So to sum up: you have custom hardware with nRF52832 Rev1 chip and you are sure that JTAG/SWD flashing and debugging works (how?). What is then new step you need help with?

  • Wow that's one quick replay thanks!

    So I know it works because I managed to flash a softdevice S132 to it from the arduino ide and run a simple code to blink the onboard led's vibrator OLED display(although it has problems after rebooting for some reason...) and connected it to my phone and sending and receiving data to it with a library all that using arduino.

    But I figured that has issues and not compatible with everything I need like NFC and other stuff so I'd like to get a little deeper to pure programming that relates to that MCU so up untill now I've set the required GCC compiler set up eclipse(can build the attached blink example in the tutorial but don't know how to flash it) and converted my STM32 disco board to a j link(for some reason can't get 3.3V out of the SWD port don't know if it's normal) and not I need a guide with example on how to wire a program to blink an LED.

  • Well I'm afraid the standard way is to use DK and thus having flashing and debugging sorted out thanks to SEGGER J-Link OB. All the tutorial on this page and Nordic Infocenter are suited for that set-up. If you want to use different flasher (SEGGER J-Link on STM32) and different target board layout (custom instead of nRF52 DK) then you have two more steps to solve. If your STM32 board works with SEGGER J-Link then you should be able to erase it with nrfjprog or nRFgo Studio. I would stay on that topic until succeeding. Then you can move to compiling some of nRF5 SDK v14 examples with your favorite IDE and toolchain (there are like 5 or more options) and then debugging through LED/GPIO/UART and logical analyzer + UART serial to USB cable (if you have any). Anyway if you encounter problems on that path it's always 1st search for related Q&S and if no help found then ask new question.

  • Yeah but I couldn't find any programming tutorials on that topic so even if I got the flashing thing on my IDE of choice(Eclipse) I won't know or understand how to even blink a certain led or read from a certain output and the examples they include with the SDK are just pre built HEX files and not source codes.

  • That's the point: most of the people practice flashing and verify HW just by using pre-compiled HWX files from SDK. You've decided to skip that by not using Nordic DK so you have some more steps to go. E.g. compilation in Keil MDK5 IDE typically works out of the box so it's question if you will go by harder way (making GCC and Eclipse or any other combination work) or if you will start from there. Changing board isn't so hard as you just need to change few global defines and write one or two header files from templates such as PCA10040.h. The only thing which might change are LF/HF clock sources, LDO/DCDC usage and particular GPIO PIN routs. So it's matter of minutes, then basic examples from SDK should work on any other HW.

    Did you have time to look how basic tutorials and SDK getting started work?

Related