Skip to content
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

AP_LOGGER: flash nand incorrect behaviour #26900

Open
BloodSakura3774 opened this issue Apr 27, 2024 · 2 comments
Open

AP_LOGGER: flash nand incorrect behaviour #26900

BloodSakura3774 opened this issue Apr 27, 2024 · 2 comments

Comments

@BloodSakura3774
Copy link
Contributor

Bug report

Tested on W25N01 with our custom board and original driver, W25N02 with our driver, and W25Q128 with Foxeer H743 and original driver.
After a full write (Until GCS says "chip full, logging stopped"), the log downloaded has no FMT data and can not be opened with MP's log viewer. And after a reboot of the FC, it will erase itself, which I believe should not happen according to wiki (https://ardupilot.org/copter/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html)
Then after another manual erase, the GCS would say "No last page of log X at top=Y or bot=Y" when opening log download page but the log is indeed continuing to be written.

Full Procedure to make it happen

  1. Enable LOG_DISARMED, set LOG_BITMASK to 3588093, set INS_RAW_LOG_OPT to 10, set INS_LOG_BAT_OPT to 5, set INS_LOG_BAT_MASK to 3, and other remains to default. (I don't think these are required but I set them to speed up the test)

  2. Reboot and Manual erase the chip.

  3. Wait until GCS says "chip full, logging stopped"

  4. Download the log and open it, it should say No FMT data.

  5. Reboot and the previous log should already be erased by itself and then do another Manual erase.

  6. After erase complete message, open the log downloading page and there should be a very small log (246 on W25Q128 and 20xx on W25N01/02) and GCS message tab says "No last page of log X at top=Y or bot=Y", with X stays the same the Y changing every time you open the download page.
    T8 KFF(@$SAACNY AT@{N60
    17UPO6QTVOWPYXKM3ZJ$3

  7. Do another reboot before GCS says "chip full, logging stopped", and the log generated from step 6 should appear and downloading it and opening it should have no error.
    Version
    At least on ArduCopter V4.6.0-dev (338f492)
    Not tested with prior version

Platform
[ ] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
Only tested with copter firmware but I believe it will happen to other platforms since its logger related.
Airframe type
N/A

Hardware type
Custom board with STM32H743 and Foxeer H743
Should happen with and FC that uses W25N01/W25N02/W25Q128 flash nand chip (At least this three nand)
Logs
N/A

@andyp1per
Copy link
Collaborator

So a big part of what you are seeing here is a result of logging too much data. The FMT messages are sent out on arming but can be severely delayed if there is a lot of logging going on. This is not a problem with the driver per se but the speed of the device. One solution is to to set a logging rate that matches the speed of the chip.

@BloodSakura3774
Copy link
Contributor Author

BloodSakura3774 commented Apr 29, 2024

Tested with log_bitmask set to only log medium atti. And used gcs to force arm the drone to start logging, the problem persists. First log still says no FMT and after reboot, erase, then the second log is not downloadable. It then disappears after another reboot.

*Log medium atti only is really a slow process, W25Q128 used about 30 min until chip full message appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants