Hello,
First, let me introduce you to my problem :
I am waiting for my custom pcb based on the nrf52832 to be ready and I want to test the flashing process. I am curently developping on the nRF52 DK and i have a second nRF52 DK. I would like to flash the second one using external programming through the first one but it doesn't work.
I have already seen many posts on the forum, mainly those 2 posts :
devzone.nordicsemi.com/.../external-programming-using-nrf52-dk
devzone.nordicsemi.com/.../program-a-nrf52-dk-with-another-nrf52-dk
I am working on mBed (we work on eclipse IDE) and I know how to flash the program on one nRF52 DK by drag and drop the .hex file directly into the borad. (there is no problem with that).
My two boards are configured as JLink (Interface MCU firmware, (with the bootloader available here : www.nordicsemi.com/.../Download.
My setup is :
- The first board is connected to the computer while the second one is supplied by an external source.
- the pins are connected like this :
Board 1 Board 2
p20.SWDIO -> p18(debug input).SWDIO
p20.SWDCLK -> p18.SWDCLK
p20.Vtg -> VCC
p20.gnd detect -> gnd
p20.reset -> p18.reset
Here you can see the photo of my setup :
Also, I used an oscilloscope on SWDIO and SWDCLK in order to see the signals, this is what I got :
(the whole transfert)
(the clock)
Then, when I drag and drop the .hex file in the first board, the board reboot and the code is flashed
After the transfert, a new file named (FAIL.TXT) appear in the first board with the message "Error while connecting to CPU". So I think the Vtg is working and the second board is correctly detected (I tried to disconect the vtg pin and the clock did'nt work anymore). But the code is not flashed on any board.
So my question is :
Is my setup corect ?
Am i supposed to use a specific software (and not just drag and drop the .hex file) ?
Why is this not working ?
thank's in advance for you help, i hope my post is accurate enough, don't hesitate to ask me more details if it's needed.
Regards.
Baptiste