[Resolved] Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Firmware/software/electronics/mechanics
H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

[Resolved] Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Thu Aug 10, 2017 4:45 am

Summary:
Put config.mk file in /tools/make not ./, where the Makefile lives. This was not clear to me even after rereading the directions later, though the example config.mk file is in that directory on Github. Maybe I need to spend more time writing C code and using makefiles.
------------------------------------------------------------------------------------------------
Hi all,

I have been building a quad host for a Big Quad build. I have double checked all my wiring, ESCs appear to function properly. After making/flashing firmware to my Crazyflie, I see the following in my console: (The first entry is without BQ attached 0 deck enumerated (obviously), second is the problem, with the BQ deck attached. It seems it sees it but can't talk to it.)

SYS: Crazyflie 2.0 is up and running!
SYS: Build 5:dc3de5771fa2 (2017.06-5) CLEAN
SYS: I am 0x333136313335510731004B and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 10 drivers
DECK_INFO: Found 0 deck memory.
DECK_CORE: 0 deck enumerated
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
SYS: Free heap: 20056 bytes
SYS: ----------------------------
SYS: Crazyflie 2.0 is up and running!
SYS: Build 5:dc3de5771fa2 (2017.06-5) CLEAN
SYS: I am 0x333136313335510731004B and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 10 drivers
DECK_INFO: Found 1 deck memory.
DECK_INFO: Warning! No driver found for deck.
DECK_CORE: 1 deck enumerated
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
SYS: Free heap: 20056 bytes

Using cfclient 2017.04, and get the same result on both Linux and Windows. The arrows on the CF and the BQ deck line up correctly. I have examined this thread, and while I have not taken voltages, the electronics seem to function normally but I can do that tomorrow.
viewtopic.php?f=6&t=2069&p=10501

When giving thrust, the crazyflie motors turn slightly, and the ESCs think they need to go into programming mode. I think some weird signal is coming out of the BQ deck as they don't do this and function normally when connected to my ESC programming card. Wish I had an oscilloscope to take a look. Also, the crazyflie appears to attempt to beep, I know the setup instructions say it should not beep or spin the rotors after this firmware mod. But it seems the BQ driver is not working properly.

Firmware appears to be functioning normally, as I can fly it just fine without the BQ deck, but maybe I can't make this assumption? Have to go to bed, to get up in a few hours, I am having way too much fun with this. You guys did an awesome job I did not truly appreciate my first few months with this platform! I appreciate any help, and will do my best to give help back.
Last edited by H0stname on Tue Aug 15, 2017 4:51 am, edited 2 times in total.

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

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by tobias » Thu Aug 10, 2017 7:41 am

I'm thinking you did not build the FW with

Code: Select all

CFLAGS += -DENABLE_BQ_DECK
Also there is a bug so the brushless motor drivers isn't activated in the latest FW. Can be quick fixed as described in this post.

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Thu Aug 10, 2017 12:16 pm

I definitely did that. I put my 'config.mk' file in the root of the firmware folder (with the Makefile), did 'make clean' first to clean out any old crap, then did 'make PLATFORM=CF2'. Followed by 'make cload' to start flashing firmware from CLI. Also tried redoing this, double checking things, and using the CFClient to flash.

I will try changing motors.c like you suggest, and potentially changing the PWM timing, but have to go to work for a bit. Just wanted to let you know I did read the directions, pretty well I think ;)
.. they seemed pretty straightforward.

thank you for the prompt response!

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Fri Aug 11, 2017 3:36 am

I pulled the latest firmware which seems to have the patch in motors.c.. I checked.

Cleaned, maked, flashed using the latest commit on github, still with the correct config.mk file (double checked spelling)

Still same issue, Here is the copy of my console display, as you can see the build is now different (obviously):
SYS: Crazyflie 2.0 is up and running!
SYS: Build 6:eeebf6ef1003 (2017.06-6) CLEAN
SYS: I am 0x333136313335510731004B and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 10 drivers
DECK_INFO: Found 1 deck memory.
DECK_INFO: Warning! No driver found for deck.
DECK_CORE: 1 deck enumerated
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
SYS: Free heap: 20056 bytes

I tried to find a datasheet for the ESC and it seems they are all about the same as far as PWM timings go. I scaled the 400 Hz pulse back to 200, since it seems 50-400 Hz are good numbers, and going over 400 the ESC can interpret pulses as one big high pulse, so I didn't want to be right on the edge.

It could also be the pullup resistor you mention in the other guy's post, but everything seems to have powered up fine. My ESCs are beeping the incorrect input signal code I believe (the directions leave much to be desired, but its a beep every 2 seconds indicating this and it goes away when I connect the programming card which I know to emit correct PWM signals to program the ESCs), but I don't have a scope as I graduated college so I have to buy one or find a friend and drive an hour or so away to test it. It seems though, that the crazyflie is not detecting the deck properly, and not putting out the correct PWM signal. All 4 of my ESCs are beeping the same incorrect signal code.

My deck is powered off of the ESC BEC (voltage regulator) which powers the crazyflie too, but I have tried using the crazyflie's battery to start and connect to it to hold down the throttle before connecting the big battery to the ESCs and thus BQ deck. Allegedly, the ESC might need to 'learn' what the PWM range of the throttle. Maybe the order of initializing the crazyflie, the deck, and the ESCs matter? If I just plug the big battery in with no crazyflie battery, everything turns on at the same time. The crazyflie still beeps and spins its propellers, making me think this is still a software issue. I know people love blaming the software team, but without a scope to dig deeper, the hardware config looks good to me. Any more hints are much appreciated.

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

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by tobias » Fri Aug 11, 2017 11:44 am

I think the problem lies within this line from the console:

Code: Select all

DECK_INFO: Warning! No driver found for deck.
So it does not find the BigQuad deck driver. So either it is not compiled in correctly or there is something wrong with the 1-wire memory. Can you build the FW with debug info:

Code: Select all

make DEBUG=1
it will output more deck information to the cfclient console.

Also this line I think tells us you did not flash a modified FW so something is fishy:

Code: Select all

SYS: Build 6:eeebf6ef1003 (2017.06-6) CLEAN
[edit] Might be wrong as the config.mk might not trigger it to be modified.

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Fri Aug 11, 2017 11:51 pm

I didn't post the output of the modified firmware from changing the PWM timing, just the latest version with the modified motors.c (But pulled from your repo so it shows up as 'CLEAN'). But I did get ahold of a scope today and can confirm there is no PWM output coming from any pins on the BQ deck, which makes sense with what the console output is saying.

I will flash with debug version soon and post the output! Wish we were on same time zone.

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Sat Aug 12, 2017 12:54 am

That is an interesting point about the config.mk. I will try without it later to see what the console says. But for now, I compiled firmware with DEBUG=1 and PLATFORM=CF2, still keeping my modified 200 Hz PWM adjustment (hence MODIFIED), I get this:
SYS: Crazyflie 2.0 is up and running!
SYS: Build 6:eeebf6ef1003 (2017.06-6) MODIFIED
SYS: I am 0x333136313335510731004B and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_DRIVERS: Found 10 drivers
DECK_DRIVERS: VID:PID 0:0 (bcRZR)
DECK_DRIVERS: VID:PID BC:1 (bcLedRing)
DECK_DRIVERS: VID:PID BC:4 (bcBuzzer)
DECK_DRIVERS: VID:PID BC:7 (bcGTGPS)
DECK_DRIVERS: VID:PID 0:0 (bcCPPM)
DECK_DRIVERS: VID:PID BC:8 (bcUSD)
DECK_DRIVERS: VID:PID BC:9 (bcZRanger)
DECK_DRIVERS: VID:PID BC:6 (bcDWM1000)
DECK_DRIVERS: VID:PID BC:A (bcFlow)
DECK_DRIVERS: VID:PID BC:FF (bcExpTest)
DECK_INFO: Found 1 deck memory.
DECK_INFO: Enumerating deck 0
DECK_INFO: Deck BC:5 bcBigQuad (Rev. C)
DECK_INFO: Used pin: 10011001
DECK_INFO: Warning! No driver found for deck.
DECK_CORE: 1 deck enumerated
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using estimator 1
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
SYS: Free heap: 20056 bytes

So it seems it does know it is the big quad deck (some form of a driver??) but still doesn't know how to use the driver properly or something? Or is failing because the memory isn't working properly. I don't know what the failure rate is on your hardware, but that seems rather unlikely. But stranger things have happened.

Also while I was measuring the BQ output with the scope, the signal line was = Vcc (always high?). I haven't found a data sheet for my ESC to confirm this but figured I'd throw in any extra information I found.

[edit] I guess there are plenty of active low protocols out there, I didn't find anything suspicious with my scope probing besides lack of a signal.

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Sat Aug 12, 2017 2:25 am

I reflashed without the config.mk, and the console in 2017.04 (Windows) didn't display anything but I have had the console go blank in other versions of CFclient. Before it went blank, it appeared to refresh with the exact same info as what I just posted, making me think the firmware compilation is somehow not being affected by the config.mk file, or the flag inside is not being interpreted correctly by the Makefile and/or firmware.. probably the firmware source itself. This seems more likely.

In another note, I cannot get any of my consoles to display more debug info :? . I tested CFClient versions: Windows 2017.04, 2017.06, commit 9b95704c8b0c5610b9f0be19932b711ee8390541 on the Bitcraze VM, and 2017.06 on native Linux machine. This is an intermittent problem I have encountered back when I worked on this as a school project. Should I open an issue request? Unfortunately I do not know what reproduces this issue, but it is very catastrophic especially when debugging situations like this, and changing versions to something else is inconvenient and introduces more variables, but that was how I worked around it in the past (downgrading to 2014 version).

[edit:] Sorry to bombard you with things, but I hope what I provided so far can help, I'm not sure how to do more debugging on my own without the console tab working properly

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

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by tobias » Mon Aug 14, 2017 10:45 am

I'll take the two things indipendent:

1.
As it looks like from the debug prints, the bcBigQuad deck driver is not compiled in. Are you sure you are building with "CFLAGS += -DENABLE_BQ_DECK" and that the config.mk is in the /tools/make folder? You could test this by making a compile error in the bigquad.c file and see that you get the error.

2.
The console data is removed from the CF2 when you connect so the CF2 has to be restarted to get the prints again. Could this be what you are experiencing?

H0stname
Member
Posts: 32
Joined: Fri Feb 17, 2017 5:44 am

Re: Crazyflie 2.0: Big Quad deck: 'DECK_INFO: Warning! No driver found for deck.

Post by H0stname » Mon Aug 14, 2017 10:56 pm

Yes sorry about that but it was a reoccurring issue that came into scope again here.

1. Yes I agree it is not being compiled in from what I am seeing. Wow, it goes in the /tools/make?? I swear I read somewhere on here it goes in the root directory, same as the Makefile itself, hence me saying this:
H0stname wrote:
Thu Aug 10, 2017 12:16 pm
I definitely did that. I put my 'config.mk' file in the root of the firmware folder (with the Makefile), did 'make clean' first to clean out any old crap
I did not know about /tools/make, even though you guys keep the example in there on Github. I put my config file in there and it works fine :lol: :lol: I'm so sorry for wasting your time with this. I even bought an oscilloscope so I wouldn't have to use the one at work if you weren't sure what was going on.

Oh well, at least I had an issue that made me go look through the firmware! I am less intimidated by it now, and have a much better understanding of how this system works! And I have a cool new test instrument coming tomorrow.

Next step is calibration, then eventually I'd like to get into the loco positioning.

Thanks a bunch for the help, I'm sorry for making a huge deal about literally nothing. I will definitely post a build log, as I struggled a bit to put this together and want others to be able to use this awesome system you guys have designed!

Post Reply