Iteratively Downloading Logs causing problems
I have developed a sample piece of code that is configured as follows:-
I am using an MMC running Firmware 1.5.0. metwear is versioned at 0.3.0 on a linux machine.
Accelerometer: ODR - 25 Hz Range: 2G
Gyroscope : ODR - 25 Hz Range : 500 deg/s
Magnetometer : ODR 25 Hz
Configure Sensors-> Configure Loggers for each sensor-> Start Logger-> Start Sensors
Wait for 60 seconds-> Download Data that has been logged (Repeated indefinitely)
After 60 seconds, when I call to download the data logged until now. I do not stop the logging session or the sensors. I get the data as expected for the last 60 seconds.
Upon testing this flow, I run into an error every 2 hours. Where in the
received_progress_update I get 0 entries which means there is no data being logged. I had a look at the calculator and it ties in at about the time the flash is expected to get full.
I have made sure that I start logging using
MetaWear.mbl_mw_logging_start(device.board, 1); I was expecting the board to automatically overwriting the memory when the flash is full. But I am not sure if it does that.
Is it ok to not stop the logging session before downloading as I have? Or do you think that is causing the problems after 2 hours?
Main idea to use this iterated download of logs is because I am interested in the data only every 60 seconds. In the meantime, the BLE connection is established but unused. With this, I am expecting better battery life compared to Streaming and segmenting data every 60 seconds.