Sometimes spresense cannot create files to Flash memory

Asked 2 years ago, Updated 2 years ago, 123 views

Currently, we are creating a program in arduino that records the value of the triaxial acceleration in flash memory on the spresense main board.However, the file is unstable, such as being created or not being created.The frequency is about once every ten times.As in the previous question (How to record acceleration values in Flash memory at regular intervals), I have opened and closed files several times every few hours, so I wonder if Flash's life has expired.Or is there another reason?

The steps you took were
1. Logged after opening the file, before Flush, and before closing, and checked on the serial monitor.
2.Run nuttx_shell and check for files
3. Copy the file to the microSD card, check the contents, and return to 1. If not, return to 1.

Yes.
This procedure did not change the log when and when the file was not created.

spresense arduino

2022-09-30 17:33

3 Answers

I have a KX122 sensor, so I just changed the KX126 to KX122 with the same source code, but it works fine.Data is added to the "4hz60.txt" file when dataFile.flush() every 30 seconds.Even if you look at the contents of the file, it contains data every 250 milliseconds.(The file has not been erased in this sketch, so it is always added after repeated execution or reset.)

"I don't know if there is any data written, some data is missing, or time is running out, but if it's a Flash problem, I think it's better to just use Flash to isolate it."

If you haven't already tried it, formatting Flash might help you recover."Example sketch for Spresense" - > "Flash" - > "format" sketch can be formatted.Please note that formatting will delete all previously retrieved data in Flash.


2022-09-30 17:33

Read and save the file's data first to see where and how it is different.


2022-09-30 17:33

I also use Flash a lot, and I have experienced symptoms of not being able to write data several times.Here's a memorandum of understanding of how to resolve the issue.

The location of recovery_tool is very confusing, but there is a link in the help.

Spresense FAQ
https://developer.sony.com/develop/spresense/docs/faq_ja.html

The Spresense serial monitor in this FAQ displays "D>" or fails to write to the board.I will also attach a link to the Recovery_tool download page just in case.

Recovery_tool Download Page
https://developer.sony.com/develop/spresense/developer-tools/spresense-recovery-tool

For instructions on how to use it, unzip the downloaded ZIP file and it comes with the manual, so please refer to it.


2022-09-30 17:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.