-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Uart data corruption issue while write data using littlefs #131
Comments
Thanks for the report! Can you confirm this clarifications on your scenarios?
Can you also provide a minimal working example? I'm assuming the data doesn't have to be NMEA and could be anything. While I haven't done it recently, I've previously received binary data over UART and wrote the results using esp_littlefs without issue. Particularly, are you sure you are flushing and closing the file prior to reading back the contents? |
Thanks for your response. 1.Receiving NMEA on uart and storing it in RAM. After all, data is received, I compute a checksum.
2.Receiving NMEA on uart, and write it to a littlefs file. Upon reading the data back and computing a checksum, it is incorrect. I'm using three threads in our code, In the First thread I'm receiving NMEA on uart, and in the other two threads, I'm writing dummy data on Littlefs. In the scenario I'm facing an NMEA checksum failed issue. If I'm commenting the Writing section of littlefs. As a result it checksum failed of the received nmea string gets stopped. I have attached my source code for your reference. |
@Kuldeep-Chandel I know this issue is quite old, but this sounds tangentially related to #161 . Does the solution mentioned there help fix the issues you were seeing? |
ESP IDF Version: 4.4.4
Littlefs Version: "1.3.1"
description: LittleFS is a small fail-safe filesystem for micro-controllers.
url: https://github.com/joltwallet/esp_littlefs
dependencies:
idf: ">=4.1"
I'm using an ESP32S3 soc chip and on UART_NUM_1 receiving NMEA data and facing some issues.
I have two scenarios,
While not using Littlefs
While Using LittleFS
I'm receiving NMEA data on uart, decoding the NMEA string, and saving the parameter into littlefs then I'm facing checksum failed issue.
As per my observation, maybe littlefs affect the global ISR of UART, and uart misses the string causing the checksum to fail.
Any ideas or suggestions to reduce this issue?
The text was updated successfully, but these errors were encountered: