-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misbehaving SD Cards blocking/delaying boot #7759
Comments
I've found, by loading a formatted microSD (16Gb class 4) into my Matek F405WSE or Matek F722WPX first. Then transferring that card to the Matek F765WSE, will allow it to work instantly, giving no further configurator connection issues. But, unlike the F405 and F722, which now give MSC access (with 4.0). The F765WSE will not display the the card as an external drive. |
please elaborate on "did not work": |
i managed to get my hands on a Kingston model with two independent reports of failure. its higher capacity (128gb vs 32gb) but hopefully that will only extragerate the issue. i will report once it arrives and i have done some testing. Just to clarify again: |
I've been having issues today, that were resolved by removing the SD card. The card is a Transcend 4GB class 10 in a Matek H743 Slim running 4.1 RC 1. I could intermittently get in to the configurator. But On save and reboot I'd get reconnection issues. Sometimes it would just timeout. Other times it say that the firmware versions don't match Removing the USB and waiting about 20 seconds, would sometimes allow reconnection. Other times would need multiple. USB cycles. Another thing that I noticed was if the arm mode was active, the whole FC would lock up. Also, disabling blackbox on the configuration page did not have any effect on the issue. Only removing the SD card resulted in trouble free iNav. |
Very interesting! does this also happen on a fresh flash of the FC? (please save a dump before you try it in case you haven't) |
@bkleiner I was recording a “how to install iNav” video at the time. So this was from a full chip erase fresh install. The only part of the diff I took over was the accelerometer calibration. Everything else was added via configurator; which was frustrating and too ages, until I removed the MicroSD card. |
Hi, I have similar issue with H743 board (Lumenier H7 lux) with 4.0.0 firmware installed (quite fresh, I have just calibrated Gyro and configure basic stuff on ports and receiver tabs). If I remove the SD card and unplug-replug the FC through USB, it works again. For info, I have formatted my SD CARD priori to insert it in the FC. Arno |
Hi again, I have tested another SD card. In fact the same like the previous except in 16go size. It works fine. Arno |
I've had similar issues with my H743 WING-V2 flight controller. I have tried several SD cards. I found one that works in H743-WING-V2 and it's the SanDisk Ultra SDXC I. Mine was 64GB but I believe the size does not matter. The format is one of the culprit, but even with the right format iNAV have issues with some cards for some reason. To format in FAT32 I used AOMEI Partition Assistant program as Windows 10 native formatter did not allow to change the format (the card was exFAT out of the box). I also tried formatting with the "SD Card Formatter" program from the sdcard.org website to not avail (it also did not allow changing the format from exFAT to FAT32). I think the issue sounds like iNAV do not use an updated or a proper library for the SD card driver. Since Betaflight does not create any issues. I think what iNAV Configurator could have is a formatter tool within the blackbox tab or offer to automatically format the sd card to its liking if a "bad card" is detected. It could be a hardware issue as well, like a missing pull-up resistor or interference in the PCB layout. |
Also made it work with a 32GB SanDisk Ultra SDXC I. Formatted it in FAT32 using AOMEI Partition Assistant for Windows 10. I did not have to insert it in another FC to make it work. So I guess H743-WING V2 is limited to this SD card brand & model, and formatted in FAT32 only. (maybe it's the SDXC, but I've tried other brand SDXC and didn't work) |
@bkleiner I've had an issue with a Matek F765-WSE, using a Sandisk 16Gb Class4 microSD card. This F765 hasn't displaying any connection problems to the Configurator.... But when the logging is enabled, it hogs heaps of scheduling time. Even to the point that every function runs slow.... The refresh rate of the OSD is very slow, Dshot reboots the ESC on arming and countless other issues. As a side note. The F765-WSE does not have MSC access... I'm not sure if you have one of these FC for testing? |
Completely solved this issue for me. I first got the error after I took out my card, took all the logs off of it and then formatted it. When I put my card back in (same card, same controller) It then would block the configurator from connecting due to high cpu load on the flight controller. Remove the card and it would connect every time. To fix, I just put the card in, connected the usb and let it set for ten minutes (You only have to do this once, it is busy making the freespace file on the card). The card will now work every time unless I format the card then I have to do the ten minute wait again. This was so frustrating to get sorted out. I tried several cards and also my spare f765. This works every time for me. The problem was easily reproduceable by just formatting the card and putting it in the controller. The problem is reliably fixed by the ten minute wait after a SD card format. |
@Fotali To say the issue is completely solved, makes it appear there isn't a problem here. |
Some more data for the group. I was unable to get a Samsung EVO Select 64GB to work (FC hung on boot), even trying the workaround from @Fotali. However, I was able to get a Samsung EVO Plus 32GB to work as expected. The 64 GB card works as expected with my prior Mateksys F765-WING so I was surprised that it did not work with the Mateksys H743-WINGv2. |
I have the same issue with H743-WLITE and Transcend 300S microSD, (both 32 and 64 GB versions). Waiting with the card inserted in the FC did not work. |
Copying this information over from #8424 Summary; I too experienced the v5.1.0 flight controller hang on boot when an SDcard is installed in MatekH743-wing v3. However, I think this is actually a hardware limitation on this particular FC (and perhaps others):
So, it feels like we need to limit the bus speed for some classes of flight controllers -- regardless of what the card reports. Seems we do have some infrastructure in place to support this: https://github.com/iNavFlight/inav/blob/master/src/main/drivers/bus_busdev_spi.c#L67 I did attempt to force it to a lower speed, but that didn't help. If anyone knows the details on the SDcard clock speeds, I can experiment. |
Had the same H743 hanging on SD inserted.. seems that H7 has bugs |
I've also been having a similar issue with a SPEEDYBEEF405. I had to set the max clock @ (https://github.com/iNavFlight/inav/blob/master/src/main/drivers/bus_busdev_spi.c#L67) to be "standard" to get my card to be recognized. After this, my new card acts just like my old card. I'm going to open a new issue for some other black box related problems. |
I should also add that when I tried Betaflight, the flight controller booted right up with no modifications. |
@b14ckyy Could this clock speed we what is causing the 765-wse to hang on boot with SD cards? |
Same issue on Matek H743-mini, only connects on the first boot and then for the whole day it stops working until I remove the SD card. Very strange behavior. |
MAtek H743 WLITE have the same |
any movement on this. I really hoped to tune my planes more but getting SD to work is hit and miss even with the same brand of cards |
For me, formatting with the official SD association formatter tool helped in some cases: https://www.sdcard.org/downloads/formatter/ |
Current Behavior
Apparently some SD Card models block usb init and/or raise cpu load.
Multiple issues have been reported recently:
Lets centralize the discussion here. Personally i can not reproduce this issue.
I primarily own SanDisk and Kingston SD Cards which all init fine.
So i am trying to identify and somehow precure a problematic sd card to look further into this issue.
If somebody would like to send me a card know to be problematic, that would be highly appreciated.
Steps to Reproduce
Expected behavior
FC should fully init, including usb, after a reasonable time with misbehaving sd cards being marked as not detected.
Suggested solution(s)
Prevent the SD Card from blocking the FC. There will always be SD Cards failing to init correctly, these should be rejected gracefully.
Additional context
I will restrict testing to the MATEKF765 and the MATEKH743.
The text was updated successfully, but these errors were encountered: