Crazyflie not turning on

Post here to get support
RifRaf
Beginner
Posts: 7
Joined: Tue Jan 16, 2018 2:22 am

Crazyflie not turning on

Post by RifRaf »

The crazyflie 2.0 refuses to turn on. It's not the battery cause I've checked using different batteries. Nothing lights up and when I press the on button. When I tried charging it, only the M2 LED lit up. Theres no blinking. Just a single LED.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie not turning on

Post by arnaud »

That is the state of this Crazyflie, is it behaving like that out of the box or has it worked before?

If you press the button when the USB port is connected, can you switch ON and OFF the M2 LED?
cflie2
Beginner
Posts: 12
Joined: Tue Feb 13, 2018 8:45 pm

Re: Crazyflie not turning on

Post by cflie2 »

I have also the same issue.
After flashing firmware (cf2_nrf.bin and cf.bin), it does not start at all, and only M2 LED is turned on.
Also, I checked the voltage and I can see zero voltage....

With long press time (>3s), CF2 M2 LED slow blink (1 Hz) and M1 LED (green) blink very fast.
With very long press time (>5s), CF2 only M2 LED fast blink (2 Hz) >> lsusb detects DFU mode

When I connect CF2 to USB port, M2 LED is turned on without blinking, and I cannot switch on and off the M2 LED with the button.
Last edited by cflie2 on Tue Feb 13, 2018 10:00 pm, edited 2 times in total.
cflie2
Beginner
Posts: 12
Joined: Tue Feb 13, 2018 8:45 pm

Re: Crazyflie not turning on

Post by cflie2 »

I have also another CF2 as well.
It has also the same issue.

But voltage showed about 3 volt.
When I plug CF2 to USB, M2 LED is turned on without blinking, and M1 LED (green) blink at about 2Hz.

When I push the button, then it turned off.
When I push the button again, then it turned on and showed same LED pattern.

With long press time (>3s), CF2 M2 LED slow blink (1 Hz) and M1 LED (green) blink at 2Hz.
With very long press time (>5s), CF2 only M2 LED fast blink (2 Hz), and I scan USB ($ lsusb) but I cannot see any DFU mode.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie not turning on

Post by arnaud »

How are you flasing the firmware? You should select the .zip file in the client, not the individual firmware (by default, if you flash a .bin it will be flashed in the STM32 even if it is an nRF firmware, the zip file contains a manifest telling the client what to flash where).

Can you take a video of the LED pattern when you long press. Press the button until it starts blinking and release it. Normally, if the STM32 firmware has not been erased, the blue leds M2 and M3 should blink.

For DFU mode, you can try to click again the button. But you should not need the DFU mode except if the STM32 bootloader has somehow been erased.

What is the state of these Crazyflies 2.0, have they been used for development before?
cflie2
Beginner
Posts: 12
Joined: Tue Feb 13, 2018 8:45 pm

Re: Crazyflie not turning on

Post by cflie2 »

Hi, thanks for your reply.

I tried to flash px4 into cf2 before. I used the bootloader in this page.
cf2 px4 : https://docs.px4.io/en/flight_controlle ... flie2.html
bootloader : https://github.com/PX4/Bootloader

It worked well, but I decided to back to bitcraze firmware, so I used bin files and virtual machine to flash.
VM : https://github.com/bitcraze/bitcraze-vm
It worked correctly.

Then, I tried to work with crazyflie_ros package, (I did not flash other firmware at this time.)
crazyflie_ros : https://github.com/whoenig/crazyflie_ros
it worked correctly, as well.

However, when I tried to use crazyswarm package, it required the other firmware.
crazyswarm : http://crazyswarm.readthedocs.io/en/latest/usage.html
But, the instruction in the above link does not work, so I used the DFU update to flash cf2_nrf.bin and cf2.bin.
DFU : https://wiki.bitcraze.io/projects:crazy ... opment:dfu
firmwares : https://github.com/USC-ACTLab/crazyswar ... r/prebuilt

After that, cf2 was not able to be turned on....

I attach the videos to show the LED pattern when I push the button and release it after 3 sec.
No. 1 : https://youtu.be/HkVq5UopIAM
No. 2 : https://youtu.be/2gjfFRy3uzc

please help me to resolve this issue...
thank you!
cflie2
Beginner
Posts: 12
Joined: Tue Feb 13, 2018 8:45 pm

Re: Crazyflie not turning on

Post by cflie2 »

Hi, arnaud!

Do you have any advice for me?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie not turning on

Post by arnaud »

Hi,

I have never used PX4 myself and I have not had time to test it yet. The green led pattern you are observing are due to PX4. I doubt the PX4 bootloader you linked work with Crazyflie and for sure it is not going to work with the stock firmware.

From what I see I can confirm that you are missing the bootloader in the STM32, you should re-flash it either with the debug adapter and a SWD debug adapter of the DFU mode.

You seem to have a bootloader in the nRF so you do not have to flash anything there, and anyway it is not possible to flash the nRF with DFU.

Have you been able to see the DFU bootloader? There seems to need an extra click needed on the power button to enable the dfu mode (the blue LED will then blink a bit faster)

You can flash the STM boorloader by downloading its bin released: https://github.com/bitcraze/crazyflie2- ... r/releases and flash it at the beginning of the flash:

Code: Select all

sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader-1.0.bin
After this is done, you should be able to restart the Crazyflie in bootloader mode and flash the latest release using the Crazyflie client. "make cload" will also work in firmware projects.
cflie2
Beginner
Posts: 12
Joined: Tue Feb 13, 2018 8:45 pm

Re: Crazyflie not turning on

Post by cflie2 »

Okay thank you for your reply.

Firstly, the answer in regard to the DFU bootloader, yes, No.1 cf2 can get the DFU bootloader mode blinking LED quickly.
I executed the following code to flash STM bootloader and get the results shown in the following.

Code: Select all

$ sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader-1.0.bin
...
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 7192
Download	[=========================] 100%         7192 bytes
Download done.
File downloaded successfully
However, it showed the solid LED pattern after replugging the USB port.

The No2. cf2 cannot get the DFU bootloader mode at all.
It did not show any result as like

Code: Select all

$ lsusb
...
Bus XXX Device XXX: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
...

By the way, I am not a professional in this field, so I need to confirm that what I understood is correct.
Here is what I understood from your reply so far.

1.
I need to buy the debug adapter (figure).
Is only this one enough to resolve this issue?
What do you mean the debug adapter and SWD debug adapter?
debug_adapter_parts.png

2.
Using the debug adapter, I should flash firmware into nRF by following
https://github.com/bitcraze/crazyflie2-nrf-firmware
That is, git it and run

Code: Select all

$ make factory_reset
or

Code: Select all

$ make
$ make flash
3.
After this is done, then I can restart cf2 in bootloader mode (pressing the button for 3 sec.) and flash the firmware by following
https://github.com/bitcraze/crazyflie-firmware


Is all correct?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie not turning on

Post by arnaud »

If you do not have the debug adapter, the DFU method should be enough.

After flashing the bootloader with DFU couldn't you get the bootloader to work? Both blue LED should blink when you press the power button for about 1.5s+

To answer your points:

1. The debug adapter board interface a SWD debugger (like ST-LinkV2 or JLink) to the Crazyflie debug port. If you do not already have one, the DFU method should work as well.

2. The debug addapter is what you need to flash th nRF using a debugger, but you would need to solder the small nRF debug adapter board to the nRF debug pads. Though I do not think you need to re-flash the nRF.

3. I would actually flash the release stock firmware package first as explained there: https://www.bitcraze.io/getting-started ... #latest-fw. When your Crazyflie is back up, you can flash https://github.com/bitcraze/crazyflie-firmware using the radio bootloader with "make cload".


I think it would be useful to know the state of these Crazyflies. This has been my assumption:
- The nRF bootloader and bluetooth stack are un-touched
- The nRF firmware is of unknown state
- The STM firmware and bootloader have been removed and replaced by PX4 firmware

Does that seems correct to you? If you have somehow modified the nRF bootloader or stack then you most likely need a debugger. If you are not sure you most likely did not modify the nRF bootloader and stack.

My assumptions matches the LED pattern I observed on your video: the M2 LED is driven by the nRF and behaves accordingly to our bootloader. The other LEDs are driven by the STM, when in bootloader mode M3 should blink.

I just did a test reproducing the state described earlier by erasing completely the STM32 in my Crazyflie. This is how I recovered it:
  1. Start the DFU bootloader by plugging a USB port while button is pressed (without battery), as soon as the fast blinking starts I release the button (this took me a couple of try, connecting USB without battery was the method that worked).
  2. Flash the STM bootloader with DFU using "dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader-1.0.bin"
  3. Reboot the Crazyflie in bootloader mode by power-cycling and pressing the button until the slow blinking.
  4. At this point both M2 and M3 blue LEDs are blinking.
  5. Flash the latest release (2018.01) using the Crazyflie client bootloader toolbox.
  6. Restart in firmware mode, my Crazyflie is back running the stock firmware!
Can you try running this sequence and tell me at which point (if any) it blocks?
Post Reply