Crazyflie can't communicate with CrazyradioPA

Post here to get support
Post Reply
s.matsuoka
Beginner
Posts: 7
Joined: Fri Sep 17, 2021 1:52 am

Crazyflie can't communicate with CrazyradioPA

Post by s.matsuoka »

Hi, I'm in trouble with Crazyflie.
I hope you can tell me how to solve this problem.

---
Environment
OS=Ubuntu 20.04 (BitcrazeVM)
ROS=Noetic
Python=3.8.10
Drone=Crazyflie2.1
radio=CrazyradioPA
---

Incident:
This issue may be related to the topic in #p22998.
The Crazyflie took flight and received a strong impact.
After that, it could not start.
Specifically, the symptoms are as follows.

What's happening:
・I could not connect to Crazyflie using cfclient via CrazyradioPA.
・Using cfclient, PC can recognize it via CrazyradioPA, but PC can't connect it.
・When I connect to battery, Only LED's M2 lights up blue
・When I connect to micro-USB, all LEDs don't light up.

What I would like to know:
・How to reset the firmware (I think this will solve the problem.)
・How to flash the firmware via micro-USB (since I can't flash it using cfclient)
・If there is another way to solve this problem, please let me know.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie can't communicate with CrazyradioPA

Post by arnaud »

Hi,

I can answer your questions but from your explaination of the problem I doubt the firmware is in cause there, not if the problem comes from a physical crash.

A little bit of context about the Crazyflie first: The Crazyflie has 2 MCUs, the main MCU is the STM32 that has control of the LED on M3, M4, M1. The radio and power management MCU is the nRF51 that has control of the LED on M2.

So only seeing M2 means that the nRF51 has started but not the STM32.
・How to reset the firmware (I think this will solve the problem.)
You need to somehow flash a stock firmware. This can be done using the radio bootloader, the SWD programming port or USB-DFU (see bellow).

The first thing to try is to start the radio bootloader. This can be done by connecting a battery and pressing the power button for about 1.5 seconds, release the button as soon as M2 is blinking. If everything goes well M2 and M3 should now be blinking. This means that both STM32 and nRF51 are in bootloader mode. You can then flash a stock firmware using the Crazyflie client in the recovery tab of the bootloader window.
・How to flash the firmware via micro-USB (since I can't flash it using cfclient)
If the radio bootloader did not start, it means that either the STM32 is damaged somehow or someone erased the bootloader using USB-DFU or SWD programming.

To recover the bootloader you can start the Crazyflie by pressing the button a long time until M2 blinks fast, you should press it at least 3 seconds. This will tell the nRF51 to start the STM32 in DFU mode, it should then be programmable via the USB port. Follow this page to flash back the bootloader: https://www.bitcraze.io/documentation/r ... pment/dfu/. Note that sometime you need to click once more on the power switch for the DFU mode to really start (the M2 LED will then blink even faster).

If this does not work it is likely the STM32 is damaged.
・If there is another way to solve this problem, please let me know.
If you have a debug adapter kit and a SWD debug adapter (st-link V2, J-link, ....), you can try to connect the STM32 using a debugger. The easiest would be to clone and build the crazyflie-firmware project and to type "make && make flash" to build and flash the firmware (by default the project is setup to use stlink-V2 but this can be changed in the Makefile).
s.matsuoka
Beginner
Posts: 7
Joined: Fri Sep 17, 2021 1:52 am

Re: Crazyflie can't communicate with CrazyradioPA

Post by s.matsuoka »

Hi arnaud

Thank you for explaining why it doesn't work and how Crazyflie works.
I now understand that there are different ways to write Firmware.
As you said, the Crazyflie did not broken, and I was able to boot it successfully by using cold bootload via wireless (using cfclient).

Thank you for helping to solve my problem.
Post Reply