The folder for the logs could not be created on the card
What ArduPilot says:
- Failed to create log directory … : …
Each time ArduPilot starts a new log it looks for its log folder on the microSD card (APM/LOGS) and creates it when it is missing. Here the card refused; the words after the colon are the file system's own reason. No log file can be opened without the folder, so “Logging failed” follows in the pre-arm checks, or “Logging not started” when you arm. This line is new in 4.7: 4.6 fails in the same place without saying why.
What to do, most likely first
There is no microSD card in the slot, or it is not seated.
CheckIn Mission Planner's MAVFtp screen nothing is listed under APM.
FixWith the power off, fit a good-quality card of 32 GB or less, formatted FAT32, then power up.
The card is full, has gone read-only, or its file system is damaged.
CheckRead the card in a computer: free space, and whether a new folder can be made on it.
FixCopy what you need, format the card, or replace it. ArduPilot keeps
LOG_FILE_MB_FREEmegabytes free by deleting its own oldest logs at start-up, but it never deletes other files.A good card is unreliable at full speed on this board.
CheckThe line comes and goes with the same card, and another good card behaves the same.
FixRaise
BRD_SD_SLOWDOWNby 1 and reboot: the board then talks to the card more slowly.
With LOG_DISARMED 0 (the default) the card is first used at the moment of arming, so this line appears only then. Set LOG_DISARMED to 1 for a session to see card trouble while still at the bench.
Parameters to look at
| Parameter | What it is |
|---|---|
LOG_BACKEND_TYPE | AP_Logger Backend Storage type |
LOG_DISARMED | Enable logging while disarmed |
LOG_FILE_MB_FREE | Old logs on the SD card will be deleted to maintain this amount of free space |
BRD_SD_SLOWDOWN | microSD slowdown |
Where to do it:Setup & Tuning Guide
The code that sends it
Failed to create log directory … : …
libraries/AP_Logger/AP_Logger_File.cpp AP_Logger_File::ensure_log_directory_exists() · Open in ArduPilot Copter-4.7.1