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.

Parents
  • I don't see a 6-pin connector in the MDBT40's datasheet, so you are on your own. Just use a multimeter to ring out the pins, that would have taken less time compared to writing this post. A 6-pin connector for SWD is non-standard.

  • What a wonderfully rude post.

    Youre assuming I’m an EE of any kind, don’t even own a multimeter much less have the time to sit and trace pins (that’s what I hire the actual EE’s to do, you know).

    Yes, obviously the MDBT40 doesn’t carry a 6 pin in schematics, the 6 pin was integrated into the daughterboard of our product- which I mentioned but you seemed to have ignored so you could be really cool on the internet and call me out.

    Fantastic work there.

    Regardless of your opinion, as I mentioned I was hoping for some guidance- being that im in a bind but thanks for letting me know that the 6 pin, which Segger sells a $100 adapter for; is somehow non standard for SWD.

  • Hi bolteon

    Keep cool. We answer questions in our spare time without getting money for that. 

    Look here, is that the 6pin adapter you mentioned?
    www.segger.com/.../

    Scroll down on that page and check connections from the 20pin standard JTAG connector to the 6-pin, 0.05 inch needle pattern

    On this page scroll down to SWD, check the layout of 20pin jlink connector.

    For another project i soldered simple wires instead of using a PCB. 

    In general: nrf51 to segger need only 4 wires. If you have an older nrf51822 then check that there is an 18k resistor from SWDIO to VDD.

    nrf51 Pin                          Segger 20pin standard JTAG connector
    -----------------------------------------------------------------------------------------
    SWDCLK                    ->  SWCLK Pin 9
    SWDIO / nRESET      ->  SWDIO Pin 7
    GND                           ->  GND      one of the GND Pins eg. Pin 4
    VDD                            -> VTREF Pin 2 & Pin 1

    Best regards,

    Lukas

  • That post is actually a lot more rude than mine. And yes, I assume sombody owns a multimeter when working with battery powered microcontrollers, as this is a very basic debugging tool for about $10.

    And no, we are not psychic and thus cannot know what the pinout of the SWD connector looks like. We need a schematic for that, which you seem to be unable to post for some reason.

    Or you could have mentionend the 3 non-plated holes directly next to the 6-pin, in which case I probably would have recognized the Tag-Connect pinout.

    My educated guess would be ARM20-CTX + TC2030-IDC-NL from Tag-Connect. That looks a lot like the bundle SEGGER sells. I recommend verifying that GND and VCC are on the expected spots, though.

Reply
  • That post is actually a lot more rude than mine. And yes, I assume sombody owns a multimeter when working with battery powered microcontrollers, as this is a very basic debugging tool for about $10.

    And no, we are not psychic and thus cannot know what the pinout of the SWD connector looks like. We need a schematic for that, which you seem to be unable to post for some reason.

    Or you could have mentionend the 3 non-plated holes directly next to the 6-pin, in which case I probably would have recognized the Tag-Connect pinout.

    My educated guess would be ARM20-CTX + TC2030-IDC-NL from Tag-Connect. That looks a lot like the bundle SEGGER sells. I recommend verifying that GND and VCC are on the expected spots, though.

Children
  • Of course it's going to be more rude- why would I reply to you kindly?

    Regardless, in the 3rd paragraph- it's kind of obvious that I'm aware of what cable I need to use (the one I already have). I was asking if there's anything I'm missing from the commands + JLink + cable... not sure how that can be misinterpreted as a request to become psychic.

    Anyway, thanks for your time.

Related