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

Programming nRF51822 via 6pin?

Hello all,

So I've ran into an unfortunate situation, our firmware team decided to ditch us just as we're about to launch our product. I got a dump from them including just about everything we ever paid them to do, and have made my way through programming our PCB boards via an AVR ISP MkII and getting our iOS and Android apps to compile via the ionic framework.

The last thing I've left to do to get us back up and running as we look for replacements is programming the Raytec MDBT40 which houses the nRF51822. Along the lines of developement we had decided to use Adafruits firmware for the unit as it had extensions written that were favorable to what we wanted to do with the module.

Looking through the dump, this seems to be the instruction set to upload the firmware via the 6pin connector on our daughter board, and from what I gather- we need to upload it via a JLink (which we have) but need the 20pin to 6pin adapter (just the PCB part, not the cable since we already have a cable that we use for the AVR ISP MkII).

 .\JLink.exe -if SWD -device nRF51822 -speed auto
 
loadfile  <PATH>\Adafruit_BluefruitLE_Firmware-master\Adafruit_BluefruitLE_Firmware-master\softdevice\s110_nRF51822_7.1.0_softdevice.hex
loadfile  <PATH>\Adafruit_BluefruitLE_Firmware-master\Adafruit_BluefruitLE_Firmware-master\0.5.0\blefriend\blefriend_s110_xxaa_0_5_0_150224_blefriend_release.hex
r
g
for spifriend go to:
loadfile  <PATH>\Adafruit_BluefruitLE_Firmware-master\Adafruit_BluefruitLE_Firmware-master\softdevice\s110_nRF51_8.0.0_softdevice.hex
loadfile <PATH>\Adafruit_BluefruitLE_Firmware-master\Adafruit_BluefruitLE_Firmware-master\0.7.7\blespifriend\blespifriend_s110_xxac_0_7_7_161213_blespifriend.hex

Is there anything I'm missing? Does anyone know if I can buy just the PCB part without the cable? I know that seems silly but why have 2 cables?

Regardless, if there's anyway to do this update via OTA- a bit of help would be appreciated as I haven't found a way to do it via the Adafruit BLE app nor the Nordic BLE Connect app... every time I try to get the module into DFU- it disconnects.

Much appreciate any help and guidance, cheers.

  • Back again... So I installed the nrfjprog software as directed from here: http://www.nordicsemi.com/eng/nordic/Products/nRF51822/nRF51-Tools/33444

    ...yet when I run nrfjprog- I get

    ERROR: JLinkARM DLL not found. Please reinstall latest JLinkARM.

  • ...oh and if I install Segger's version 6.32 from here- https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack

    That missing ARM issue goes away but then I get:

    ERROR: Low voltage detected at the target. Please make sure the device is
    ERROR: properly supplied.

    If I try and run jlink.exe with the commands I posted at the top- it can't connect. I guess I'm missing something here? Just to clarify- the device is powered, and programs with the same cable when connected to the AVR ISP MkII, USB cable is the same too.

    Do you *need* to install nrfjprog? If so, why are my commands regular jlink programming commands? Please help some more...

  • Still at a complete loss as to getting this setup properly... I've tried 3 different computers now, 2 Windows and a MacOS. All eventually get to the same point of not being able to connect after outputting this in console:

    MacBook-Pro:jlink user$ JLinkexe -if SWD -device nRF51822 -speed auto
    SEGGER J-Link Commander V6.20i (Compiled Nov 17 2017 17:33:48)
    DLL version V6.20i, compiled Nov 17 2017 17:33:39
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link V10 compiled Apr 20 2018 16:47:09
    Hardware version: V10.10
    S/N: 260104503
    License(s): FlashBP, GDB
    OEM: SEGGER-EDU
    VTref = 1.019V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>connect
    Device "NRF51822_XXAA" selected.
    TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
    TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
    
    
    Connecting to target via SWD
    Cannot connect to target.
    J-Link>connect
    Device "NRF51822_XXAA" selected.
    
    
    Connecting to target via SWD
    Cannot connect to target.
    J-Link>connect
    Device "NRF51822_XXAA" selected.

    Can someone please help me get this setup correctly? It's a bit insane to still not have a functional dev env after 4 days of effort... (conversely, I could program with the AVR ISP MkII in an hour of getting the package in the mail).

  • Some thing odd here.  AVR ISP cannot program the nRF chip.  It is only made for the Atmel AVR.  I am not sure to completely understand your setup.  Another thing, I see from your JLink output that the target voltage is only 1.019V.  That will not work for nRF51 chip.  It needs at least 1.75V 

  • I was referring to programming the Atmel MCU with the AVR ISP MkII...

    The highest I've seen the voltage come through is 1.025V, any idea on how this could be an issue? Every board I've used has been in that range, and this is the prescribed method to programming the boards BLE module...

    Currently powering the board through a benchtop SLA 12V battery.

Related