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

Flashing nrf52832 chip with ST link V2

Hello, Is it possible to use this:

www.ebay.com/.../401088363326

for flashing the nrf52832 chip? if so how? is this thing the same as Jlink?

  • Great and simple idea to do it didn't think about it before though I still don't understand how programming the chip with segger ide(programming wise) and can't find any guides for nordic type of programming so the project is stuck.

  • Hi,

    I'd also like to ask, does the same apply for ST-LinkV3set?

    Can I use it as well to program nRF52832?

    Thanks

  • You can also try the IDAP-Link CMSIS-DAP. It comes with software to flash softdevice and dfu without the need of mergehex also supports parallel flashing for production.

  • Hi nirk,

    where you able to figure it out? I created a custom programmer board using the STLINK-V3 module from ST.

    When I want to upload a hex file to the attached NRF52810, I get the following output from openOcd:

    C:\Users\david>openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "reset_config none; program MyHexFile.ihex verify reset exit"
    Open On-Chip Debugger 0.10.0 (2020-03-10) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    Info : clock speed 1000 kHz
    Info : STLINK v3 JTAG v5 API v3 SWIM v1 VID 0x0483 PID 0x374F
    Info : using stlink api v3
    Info : Target voltage: 2.568788
    Info : Stlink adapter speed set to 1000 kHz
    Error: jtag status contains invalid mode value - communication failure
    Polling target nrf52.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms
    Info : Previous state query failed, trying to reconnect
    Error: jtag status contains invalid mode value - communication failure
    Polling target nrf52.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 300ms
    Info : Listening on port 3333 for gdb connections
    ** Unable to reset target **
    shutdown command invoked

    Interestingly, using an STLINK-V2 it works perfectly:

    C:\Users\david>openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "reset_config none; program MyHexFile.ihex verify reset exit"
    Open On-Chip Debugger 0.10.0 (2020-03-10) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    Info : clock speed 1000 kHz
    Info : STLINK v2 JTAG v35 API v2 SWIM v7 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 2.566820
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : Stlink adapter speed set to 950 kHz
    Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
    Info : Listening on port 3333 for gdb connections
    target halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
    ** Programming Started **
    Info : nRF52810-QFAA(build code: D0) 192kB Flash, 24kB RAM
    Warn : Adding extra erase range, 0x00027280 .. 0x00027fff
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x2000001e msp: 0x20000400
    ** Programming Finished **
    ** Verify Started **
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x2000002e msp: 0x20000400
    ** Verified OK **
    ** Resetting Target **
    shutdown command invoked

    However, using the STLINK-V3 for debugging/flashing STM32 microcontrollers works perfectly.

    Thanks in advance

    David

Related