[SOLVED] CF 2.0 not restarting in firmware mode

Post here to get support
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

[SOLVED] CF 2.0 not restarting in firmware mode

Post by alex »

Good evening,

after flashing my CF 2.0 with a custom firmware it doen't restart in firmware mode. Clicking the button 'Restart in firmware mode' only leads to LEDs 2 and 3 shining constantly. Even after manually switching the CF off and on again there's no normal startup cycle. It seems like it doesn't recover from flashing mode. Any suggestions?

Thank you.

-alex
Last edited by alex on Sun Mar 29, 2015 8:51 pm, edited 1 time in total.
poizone
Member
Posts: 59
Joined: Thu Feb 05, 2015 3:59 am
Location: Ohio, USA

Re: CF 2.0 not restarting in firmware mode after flashing

Post by poizone »

I had a similar issue on my CF1. Your flash probably went awry. Try again with a known good build, because it may be a bug or build error in the build you're trying to flash.
One day our flies will drown out the sun in an autonomous Skynet of whirring motors and blinking lights.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: CF 2.0 not restarting in firmware mode after flashing

Post by alex »

I flashed the original clean firmware freshly compiled from the crazyflie2 branch. Same problem: the copter can't restart in firmware mode. So this leads me to the conclusion that my custom firmware isn't the reason.

Until now I only coded for my CF 1.0. Recently, I ported the code to 2.0. The try mentioned above was the first time to flash a custom CF 2.0 firmware so one can assume a virgin CF 2.0.
poizone
Member
Posts: 59
Joined: Thu Feb 05, 2015 3:59 am
Location: Ohio, USA

Re: CF 2.0 not restarting in firmware mode after flashing

Post by poizone »

Are you using the proper toolchain? The CF1 requires a 4.7 arm-none-eabi toolchain while the CF2 was moved to 4.9 from what I can tell. They aren't interchangable based on my testing, even if it builds properly.
One day our flies will drown out the sun in an autonomous Skynet of whirring motors and blinking lights.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: CF 2.0 not restarting in firmware mode after flashing

Post by chad »

poizone wrote:Are you using the proper toolchain? The CF1 requires a 4.7 arm-none-eabi toolchain while the CF2 was moved to 4.9 from what I can tell. They aren't interchangable based on my testing, even if it builds properly.
alex wrote:Until now I only coded for my CF 1.0. Recently, I ported the code to 2.0. The try mentioned above was the first time to flash a custom CF 2.0 firmware so one can assume a virgin CF 2.0.
Crazyflie 1 toolchain is: gcc-arm-none-eabi-4_7-2013q1
Crazyflie 2 toolchain is: gcc-arm-none-eabi-4_9-2014q4

The Crazyflie 1 firmware will compile ok (and run on your Crazyflie) in either gcc-arm-none-eabi-4_7-2013q1, or gcc-arm-none-eabi-4_9-2014q4.
The Crazyflie 2 firmware will only compile and run on your Crazyflie 2.0 in gcc-arm-none-eabi-4_9-2014q4. Even though it will compile cleanly in gcc-arm-none-eabi-4_7-2013q1, it will not run...

...at least this IIRC. It's been a little while since I've played with this.

Quite possible, as poizone says, that you need to update your dev environment.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: CF 2.0 not restarting in firmware mode after flashing

Post by alex »

I'm running the Bitcraze VM 0.6 which should already be prepared for compiling the firmware 2.0, shouldn't it?
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: CF 2.0 not restarting in firmware mode after flashing

Post by chad »

alex wrote:I'm running the Bitcraze VM 0.6 which should already be prepared for compiling the firmware 2.0, shouldn't it?
Yes. It should.

Is the CF2.0 port of your code available at GitHub? I could try flashing mine and see if it works...
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: CF 2.0 not restarting in firmware mode after flashing

Post by alex »

chad wrote:
alex wrote:I'm running the Bitcraze VM 0.6 which should already be prepared for compiling the firmware 2.0, shouldn't it?
Yes. It should.

Is the CF2.0 port of your code available at GitHub? I could try flashing mine and see if it works...
Yes, of course. I pushed my sonar MB1242 implementation for the CF 2.0 to a new feature branch called sonar-cf2:

https://github.com/alexriegel/crazyflie ... /sonar-cf2

Thanks for your support. If you have any suggestions for code improvement besides the flashing issue, I would be grateful.
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: CF 2.0 not restarting in firmware mode after flashing

Post by chad »

Hi alex,

I was able to build and flash your firmware successfully but self-test fails and causes the M1 red LED to flash 5 times quickly. If I connect via the client I get an I2CDEV error.

I2CDEV: Error callback nr: 512
38 3B 0 0 0 0 0 0 AA AA 55 55 AA AA 55 55
Status 5
B4 3E 0 0 0 0 0 0 AA AA 55 55 AA AA 55 55
Status 5
B4 3E 0 0 0 0 0 0 AA AA 55 55 AA AA 55 55
Status 5
38 3B 0 0 0 0 0 0 AA AA 55 55 AA AA 55 55
66 16 66 13 0 0 0 0 AA AA 55 55 AA AA 55 55
Status 5
B4 3E 0 0 0 0 0 0 AA AA 55 55 AA AA 55 55


So, while the firmware isn't totally runnable, I was able to flash it and restart the Crazyflie OK.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: CF 2.0 not restarting in firmware mode after flashing

Post by alex »

Ok, after flashing my custom firmware again without the sonar connected via I2C, the CF restarts in firmware mode correctly. I assume that flashing with the sonar deck attached to the copter caused the problem. Now it throws the console/LED errors you already described above. Have to get the I2C working now... Thanks, chad.
Last edited by alex on Mon Mar 09, 2015 9:37 pm, edited 1 time in total.
Post Reply