Using micro-SD deck with flowdeck V2

Post here to get support
Post Reply
Aurélien_Camps
Beginner
Posts: 3
Joined: Fri Jul 24, 2020 9:08 am

Using micro-SD deck with flowdeck V2

Post by Aurélien_Camps »

Forum split from: viewtopic.php?f=5&t=4186&p=19075&hilit= ... eck#p19075

Hi @kimberly, I recently ran into the same issue. The fixed firmware (cf2_2020.02_uSD_increased_heap.bin) unfortunately did not help in my case.

So to recap the issue :
- The drone is able to start and fly with the optical flow deck pluged in and fully fonctionnal
- The drone is able to log data to the sd card without the optical flow deck
- BUT when I try to plug simultanously the µsd card (with a config.txt file in it) and the optical flow sensor, the drone boot once, then reboot after 3 secound and the M1 led blink 5 time to meaning the initial self test failed.

As tobias, there is no issue as long as the config file isn't in the µsd card.

I tried to flash the latest available software (firmware-cf2-2020.06) and the one on your post.
(By the way with the cf2_2020.02_uSD_increased_heap firmware I can't use any of the Assist flight mode : propellers spins but doesn't take off.)

You can find the console log I recorded bellow.

How can I fix this ?

Thank you by advance ! :)


SYS: ----------------------------
SYS: Crazyflie 2.0 is up and running!
SYS: Build 32:c9136ceed72c (2020.02 +32) MODIFIED
SYS: I am 0x3934323530374718002F0026 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 2 deck(s) found
DECK_CORE: Calling INIT on driver bcFlow for deck 0
PMW: Motion chip id: 0x49:0xB6
DECK_CORE: Calling INIT on driver bcUSD for deck 1
uSD: mount SD-Card [OK].
uSD: Config read [OK].
uSD: Frequency: 1Hz. Buffer size: 10
uSD: enOnStartup: 1. mode: 2
uSD: slots: 6, 24
uMPU9250 I2C connection [OK].
SD: wait for sensors
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
DECK_CORE: Deck 0 test [OK].
DECK_CORE: Deck 1 test [OK].
STAB: Wait for sensor calibration...
SYS: Free heap: 8664 bytes
STAB: Ready to fly.
uSD: malloc buffer 280 bytes...uSD: [OK].
uSD: Free heap: 8344 bytes
uSD: Filename: log00
SYS: ----------------------------
SYS: Crazyflie 2.0 is up and running!
SYS: Build 32:c9136ceed72c (2020.02 +32) MODIFIED
OW: Cmd 0x22 timeout.
DECK_INFO: Reading deck nr:0 [FAILED]. No driver will be initialized!
OW: Cmd 0x22 timeout.
DECK_INFO: Reading deck nr:1 [FAILED]. No driver will be initialized!
DECK_CORE: 0 deck(s) found
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Complementary (1) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
AK8963: Self test [OK].
SYS: The system resumed after watchdog timeout [WARNING]
SYS: Assert failed at .//vendor/FreeRTOS/tasks.c:4049
Aurélien_Camps
Beginner
Posts: 3
Joined: Fri Jul 24, 2020 9:08 am

RE: Using micro-SD deck with flowdeck V2

Post by Aurélien_Camps »

Also, sometime, I'm able to fly the drone in it's fisrt boot sequence with the new firmware. But between 30 second or 2 minutes latter, it reboot in the self test failed mode while flying. I'm able to do so aproximatley once each 10 attempts. And at each try, I'm able to connect the drone with the crazyradio pa for at least 2 seconds before it reboot.
kimberly
Bitcraze
Posts: 560
Joined: Fri Jul 06, 2018 11:13 am

Re: Using micro-SD deck with flowdeck V2

Post by kimberly »

Hi!

I can't really see what is exactly going on here. We already increased the memory a lot in the firmware so that can not be it. And its interesting to see that you are having the same problem with the flowdeck while the other person had the problem with the zranger...

Might be worth making an issue on the github so that we can look into this more carefully. There might be something more low level going on.

In the meantime, have you tried to add a delay to the while loop of the microsd deck driver? It is a similar solution as described in this issue for the flowdeck-lpsdeck issue but its worth a try to see if it works
Aurélien_Camps
Beginner
Posts: 3
Joined: Fri Jul 24, 2020 9:08 am

Re: Using micro-SD deck with flowdeck V2

Post by Aurélien_Camps »

First, thank you for your quick response.

I juste tried adding a delay function as they do on your github page with vTaskDelay(5);
I tried 3, 5, 10 and 20 in the while loop of the usdWriteTask() in usddeck.c file

The drone still behave the same.

Also I'm seeing that there is already a 10 (ns?) delay in the flowdesktask.
kimberly
Bitcraze
Posts: 560
Joined: Fri Jul 06, 2018 11:13 am

Re: Using micro-SD deck with flowdeck V2

Post by kimberly »

Ah oke, too bad that the fix didn't work. It was worth the effort :) so thanks for trying it out.

The flowdeck has indeed has a delay in the while loop, but we do that with almost all tasks. It is mostly to slow it down, since it is not necessary to read out the measurement so many times (also it breaks a lot of stuff if it loops too fast).

What you can try out is maybe increase the delay in the flowdeck driver instead. In the mean time, I created this github issue: https://github.com/bitcraze/crazyflie-f ... issues/606. There might be a more underlying problem going on here.
kimberly
Bitcraze
Posts: 560
Joined: Fri Jul 06, 2018 11:13 am

Re: Using micro-SD deck with flowdeck V2

Post by kimberly »

hi! An update on this, since this issue is created. https://github.com/bitcraze/crazyflie-f ... issues/593

Unfortunately there is currently no solid fix for it unless you change the port of the usddeck I'm afraid. We are looking into changing the driver but would be good to keep an eye on the issue.
Post Reply