Only M2 blue led on

Post here to get support
Post Reply
david
Beginner
Posts: 18
Joined: Wed Aug 30, 2017 2:10 pm

Only M2 blue led on

Post by david » Thu Oct 12, 2017 9:44 am

Hi again,

I know this problem has been talked about here but I still wasn't able to fix it.

I was flying a CF2 which I had noticed that had the power cables breaking away from the board, when I landed it and went to replace the battery both wires broke. The power wires were soldered to the board and when I tried to fly it again only the M2 blue led turned on. When I try to put it in bootloader mode only the M2 blue led blinks. I have tried to flash it using a CR but it doesn't work (it times-out). When I try to connect to it using the cfclient, the CF2 radio is detected but when I press connect it stays connecting indefinitely. If I remove the CR and connect to the pc using the usb cable the cfclient doesn't find it.

The Vcc to ground voltage is:
Turned on almost 0V
Bootloader mode 1.6V

Can anyone help?
Thank you.

tobias
Bitcraze
Posts: 1541
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Only M2 blue led on

Post by tobias » Thu Oct 12, 2017 1:09 pm

Very hard to tell but my guess is that something been shorted. Can you feel anything getting particular hot when it is on? Try connecting to the DFU bootloader.

david
Beginner
Posts: 18
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david » Thu Oct 12, 2017 3:48 pm

Nothing gets particular warm when I plug in the battery and the battery hasn't been decharging particularly fast either. I couldn't connect to the DFU bootloader.

david
Beginner
Posts: 18
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david » Thu Oct 12, 2017 9:03 pm

I have been looking around and I noticed that the VEN_D enable which powers VCC and the STM is low ~0V. Does this still sounds like a short circuit happened or is it possible that somehow the NFR firmware got messed up? If yes the only way to reprogram it is using the debug adapter and a JTAG programmer right?

arnaud
Bitcraze
Posts: 1212
Joined: Tue Feb 06, 2007 12:36 pm

Re: Only M2 blue led on

Post by arnaud » Mon Oct 16, 2017 12:37 pm

If you cannot connect the DFU bootloader it is unlikely to be only a firmware problem. What happens when you boot the Crazyflie in DFU mode, is it recognised by the computer as a USB device? Does is help to click again on the ON/OFF button when the Crazyflie is in DFU mode and connected to the computer?

david
Beginner
Posts: 18
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david » Mon Oct 16, 2017 12:47 pm

Hi,

I have been trying to flash the NRF to check if it's really fried or not, I'm using the VM and an Rlink.

I've changed the interface in the crazyflie2-nrf-firmware Makefile to the rlink.cfg file and runned flash (no BLE) and this was the output:

Code: Select all

make flash BLE=0 
openocd -d2 -f interface/rlink.cfg  -f target/nrf51.cfg  -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
                 -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Warn : Adapter driver 'rlink' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
embedded:startup.tcl:21: Error: newtap: nrf51.cpu missing IR length
in procedure 'script' 
at file "embedded:startup.tcl", line 60
in procedure 'swj_newdap' called at file "/home/bitcraze/.openocd/target/nrf51.cfg", line 33
in procedure 'jtag' called at file "/home/bitcraze/.openocd/target/swj-dp.tcl", line 30
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21
Since I got the IR length error I added "-irlen 2" flag to the 33rd line (swj_newdap $_CHIPNAME cpu -irlen 2 -expected-id $_CPUTAPID) of the nrf51.cfg file. I runned the flash (no BLE) again and this was the output: (I had everything connected to the SWD port which was soldered to the CF and the CF was being powered by a battery)

Code: Select all

make flash BLE=0 
openocd -d2 -f interface/rlink.cfg  -f target/nrf51.cfg  -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
                 -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Warn : Adapter driver 'rlink' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : clock speed 375 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: nrf51.cpu: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf51.cpu          cortex_m   little nrf51.cpu          unknown
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: nrf51.cpu: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Error: Target not examined yet
in procedure 'reset' 
in procedure 'ocd_bouncer'
I'm stuck now, I have no idea what I'm doing wrong or if this is just the output we get when the nrf fries.

I would appreciate any help. Thanks

arnaud
Bitcraze
Posts: 1212
Joined: Tue Feb 06, 2007 12:36 pm

Re: Only M2 blue led on

Post by arnaud » Mon Oct 16, 2017 1:06 pm

First of all, it is pretty hard to fry a chip that way so that would not be my first assumption :-).

Are you connecting on the jtag debugger to the nRF51 debug port? It is on the side of the Crazyflie: https://wiki.bitcraze.io/projects:crazy ... pter:index

To program the Crazyflie you need an addapter that is compatible with SWD. This line "assuming legacy JTAG-only" in your command output seems to suggest that you are in jtag-mode. It could explain your problems.

We have successfully flashed the Crazyflie with stlink-v2 and j-link so maybe you can find one of those? You could also try to program the nRF51 with r-link tools directly, I have never used an e-link cable but for j-link and st-link there is tools provided that allows to flash a binary or .hex file directly.

david
Beginner
Posts: 18
Joined: Wed Aug 30, 2017 2:10 pm

Re: Only M2 blue led on

Post by david » Tue Oct 17, 2017 10:45 am

For me it has been really hard to understand to which I should be connected to, everything I read confused me more. There is the one that is already on the Crazyflie and there is the one that has to be soldered to the Crazyflie (I don't understand what is the name of each one). When running the code for the previous reply I was connected to the one which has to be soldered, which I think is the one connected to the NRF.

Ok, I understand what you are saying and I have tried to change that using the "-c 'transport select swd'" option but it didn't work. I think openocd doesn't support that for rlink.

Code: Select all

make flash BLE=0 
openocd -c 'transport select swd' -d2 -f interface/rlink.cfg  -f target/nrf51.cfg  -c init -c targets -c "reset halt" \
                 -c "flash write_image erase cf2_nrf.hex" -c "verify_image cf2_nrf.hex" \
                 -c "reset run" -c shutdown
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Error: Debug adapter doesn't support any transports?
embedded:startup.tcl:21: Error: 
in procedure 'transport' 
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21
I'll give the r-link tools a try and try to find a stlink-v2 or a j-link.

I also have a few questions:
Does it matter on which mode is the CF? (normal, bootloader, DFU)
Does the battery even need to be connected?
Thank you for your reply!

arnaud
Bitcraze
Posts: 1212
Joined: Tue Feb 06, 2007 12:36 pm

Re: Only M2 blue led on

Post by arnaud » Tue Oct 17, 2017 11:14 am

Hi,
In order to flash the Crazyflie MCUs the board should be powered, preferably with the battery. The mode should not matter, for the STM32 the NRF should be flashed and working since the nRF will enable the power to the STM32 when the Crazyflie is switched ON.

Post Reply