Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4741

General discussion • Raspberry Pi PICO w getting stuck

$
0
0
Hi.. There
Recently we had an issue, where the RPI Pico got stuck


However, this time we closely trace the debug logs into the teraterm serial terminal
In our code, we are using the Arduino littlefs library to log the error codes , and keep the few device configurations

We are passing the device_info structure to the functions to log the important information into the NV-ROM

We have created the MACRO called "SET_ERROR(error_type)" to log the hex error code into the littlefs file system during the run time if any error occurs
After some observations, we know that the code might be stuck while storing the error code in the FS

Every time, it opens the deviceInfo.txt file, log the error, and then closes it.

I have attached the MACROS and WriteToFile functions snippets here

Previously, we used the same logic with the many controllers from different manufacturers, but this is the very first time with the RP2040
Based on that, I have a couple of questions
1. how reliable it is to use the little to keep the error codes, and is there any chance of flash corruption because of read and write cycles?
2. Does Little Library have any blocking functions or internal calls at the lower-level drivers?
3. Does opening the file and closing it cause any issues or any chance of flash corruption?
4.
Let me know if you have any suggestions for the same
Appreciate all suggestions and comments



PS: we have allocated 1MB to sketch and 1MB to FS
er2.png

er1.png

Statistics: Posted by Parth_Parekh011 — Tue Jun 04, 2024 4:28 am



Viewing all articles
Browse latest Browse all 4741

Trending Articles