sparkfun / OpenLog

Open Source Hardware Datalogger
https://www.sparkfun.com/products/9530
Other
547 stars 215 forks source link

Empty Log File #232

Open rzurbuch opened 4 years ago

rzurbuch commented 4 years ago

Subject of the issue

I have the OpenLog connected to some proprietary hardware. Our HW is sending UART data (115200bps) to the OpenLog. We also have the OpenLog RXI line connected to an o-scope to verify UART traffic. When we power up the HW and the OpenLog, we see activity on the o-scope for a bit and it stops (let's call this Activity#1). There is around 100 bytes of data sent to the OpenLog before going idle. We remove the SDCard and the log is empty. We plug the SDCard back into the OpenLog. We make the HW send some more UART data (maybe 100 more bytes, let's call this Activity #2). We remove the SDCard and we see data but it is from Activity #1. For some reason the buffer isn't being purged. My understanding is that the buffer should be sent to the SDCard when there is 500ms of UART idle time.

Your workbench

Steps to reproduce

I can't seem to reproduce on a standalone OpenLog. I'm only able to reproduce when it is connected to our HW.

Expected behavior

I expect that all UART data should be recorded to the SDCard. It shouldn't sit in the RAM of the micro.

Actual behavior

See above.

rzurbuch commented 4 years ago

Steps to Reproduce:

Test #1: Show that the log file in the SD Card is empty after sending data to the OpenLog ...

  1. Power up the OpenLog
  2. wait for the OpenLog to go to sleep (>2seconds)
  3. Send the OpenLog some UART data: "This is the 1st message."
  4. Power down the OpenLog.
  5. If you look at the current log in the SDCard, it should be empty.

Test #2: Show that the log file doesn't contain all the data sent to the OpenLog. The last bit of data is stored in the OpenLog buffer and isn't sent to the SD Card.

  1. Power up the Open Log.
  2. wait for the OpenLog to go to sleep (>2seconds). I used 3 seconds.
  3. Send the OpenLog some UART data: "This is the 1st message."
  4. wait for the OpenLog to go to sleep (>2seconds). I used 3 seconds.
  5. Send the OpenLog some UART data: "This is the 2nd message."
  6. Power down the OpenLog.
  7. If you look at the current log in the SDCard, it should show the first message ("This is the 1st message" but won't show the second message ("This is the 2nd message.").
nevercast commented 4 years ago

I think I may be seeing this issue also, on a fresh OpenLog bought from SparkFun