Open Kuldeep-Chandel opened 1 year ago
Thanks for the report! Can you confirm this clarifications on your scenarios?
Receiving NMEA on uart and storing it in RAM. After all data is received, I compute a checksum.
Receiving NMEA on uart, and write it to a littlefs file. Upon reading the data back and computing a checksum, it is incorrect.
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.
Receiving Nmea on uart and storing it in RAM, I calculate the checksum after receiving one string.
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. nmea0183_parser.zip
@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?