PreArm: logging fail 3.6.2

Hello, I have an hexa with 3.5.7 and it was working fine, I changed to 3.6.2 and have an intermittent appearance of the message " PreArm: logging fail". Power down and on several times eventually the message disappears and I could takeoff. After returning to 3.5.7 the problem is solved.

Any idea?

Gino

1 Like

I have the latest firmware 3.6.X is also a problem…

LOG_BACKEND_TYPE has to be set to 0 or 1 for some reason it doesn’t like to save to Mavlink, I set it to 1: File and the error goes away

Do you actually have a vehicle with a companion computer doing dataflash logging over mavlink?

Nonetheless, the Solo has been having that issue for years. It is intermittent. And even when it says logging failed, it is still logging to file and mavlink just fine.

I have the “LOG_BACKEND_TYPE” parameter set to 1 and the error appears regularly.

Hi,
3.6.2 Chibios or NuttX ?
Which FC ?

Chibios

Pix4Pilot from HobbyKing with 1GB SD Card

I think it is Chibios, I am not sure. When instaling 3.6.2 there was a question about updating Chibios

Re-load 3.6.2 without ChibiOS, or try a fast SD-card. My logging issues disappeared when I plugged in a 32GB U1 Samsung uSD, but others still encountered the error after switching to SanDisk U1 cards
It only happens on ChibiOS, and it disappears if, after powering up, you do an I/O reset using the built-in switch.
DEV-team has it on the to-do list, but I think their plate is full, and it only happens on some clones and not others.

IO reset or FMU reset?

set LOG_FILE_BUFSIZE to 8

1 Like

It worked! The message disappeared .

1 Like

It used to work with I/O reset. No more I/O thread heartbeat and Bad logging messages. But I tried it today with a no-name uSD and reset won’t help anymore. Neither I/O nor FMU reset solves the problem. I’m baffled.

Them damn clones with resistors in place of level-shifters and other cheap shortcuts.

@ThePara could you try setting the LOG_FILE_BUFSIZE change?

I found that this problem started at AC3.61,Whenever set LOG_FILE_BUFSIZE to 16 that TF card will appearance of the message"PreArm":logging fail" or FC starting failed. I think this is a problem form AC3.61 on Chibios.

@peterbarker of course I tried. No candy.

LOG_BUFFER_SIZE did not help me. Also tried 4. I only have SanDisk SDs. I can try a Samsung card. Any time I run Chibios I get the message unless I’m plugged into usb. I believe it’s related to the voltage at startup. I think I’ll try to figure this one out since I can reproduce it very easily.

It’s not the brand that matters, it’s the speed. Search for an SD that’s certified for speed. U1, U3 if possible.
I used to fly and record with one of the first Sony 4K handhelds, the AX100, which was very fiddly regarding the cards. I think it was actually testing their speeds when inserted because on many it was refusing to switch from HD 30 fps to either HD 60 fps or 4K 30 fps.
Anyway, SanDisk may be a better target for chinese lo-quality cloners then more obscure SD manufacturers.

I am still seeing logging fails with a sandisk extreme u3, the reccomended card, It only happens on Chibios, but with blheli32 escs that is really my only choice now, It has to be an initialization problem somewhere. If I reboot it’s fine (not power cycle). If I power from USB it’s fine. I only see issues when powering via the power connector or rail. I’m trying to get some debugging info on this, adding print statements here and there.

I’m pretty sure this problem is related to ChibiOS, it is a known issue, has nothing to do with the microSD card. I’m pretty sure @tridge is aware of it and will be addressing it. It is not a critical failure, as most times rebooting the controller will “fix” it. If you ignore the issue by disabling the checks, arm and fly, it does nothing bad other than get a 4kB log file with nothing in it. It doesn’t affect anything else that I have ever found.