Page 1 of 3
[SOLVED] CF 2.0 not restarting in firmware mode
Posted: Thu Mar 05, 2015 9:26 pm
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
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Fri Mar 06, 2015 3:59 am
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sat Mar 07, 2015 10:03 pm
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sun Mar 08, 2015 12:15 am
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sun Mar 08, 2015 2:08 am
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sun Mar 08, 2015 6:24 pm
by alex
I'm running the Bitcraze VM 0.6 which should already be prepared for compiling the firmware 2.0, shouldn't it?
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sun Mar 08, 2015 6:40 pm
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...
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Sun Mar 08, 2015 9:39 pm
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Mon Mar 09, 2015 1:17 am
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.
Re: CF 2.0 not restarting in firmware mode after flashing
Posted: Mon Mar 09, 2015 8:29 pm
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.