LIFsCode / ELOC-3.0

Firmware for ELOC 3.0 Hardware
MIT License
2 stars 3 forks source link

Random reboot issues #2 #56

Closed EDsteve closed 6 months ago

EDsteve commented 6 months ago

@OOHehir I have realized that issue already one week ago and i assume it came with the merge. When the recording gets stopped via BT command. The ELOC reboots a few seconds after. I would say almost 50% of the time. Using ELOC 3.3 HW with latest commit (a41a3fe247dd427927a4c0f9e7e5649c60a0151b)

Here is the log which hopefully helps: Log_Reboot_recordoff.txt

EDsteve commented 6 months ago

@OOHehir Sorry to add another one. But just by accident i happened to see one more reboot. This time during recording. This reboot happaned after around 80 minutes of recording without me interfering. Will make more long term recordings now to see if it always happens again.

Log file: Reboot during record.txt

Using this config: ELOC 3.3 HW with latest commit (https://github.com/LIFsCode/ELOC-3.0/commit/a41a3fe247dd427927a4c0f9e7e5649c60a0151b) { "device": { "fileHeader": "not_set", "locationCode": "unknown", "locationAccuracy": 99, "nodeName": "ELOC_SD_CONFIG_Samsung" }, "config": { "secondsPerFile": 60, "cpuMaxFrequencyMHZ": 80, "cpuMinFrequencyMHZ": 10, "cpuEnableLightSleep": true, "bluetoothEnableAtStart": true, "bluetoothEnableOnTapping": true, "bluetoothEnableDuringRecord": true, "bluetoothOffTimeoutSeconds": 30, "logConfig": { "logToSdCard": false, "filename": "/sdcard/log/eloc.log", "maxFiles": 10, "maxFileSize": 5120 } }, "mic": { "MicType": "ns", "MicBitShift": 11, "MicSampleRate": 16000, "MicUseAPLL": true, "MicUseTimingFix": true } }

OOHehir commented 6 months ago

ED,

No problem, will take a look over the next day or two.

OOHehir commented 6 months ago

@EDsteve I think I understand this bug, but it's one of those that's hard to be certain. I think it goes like this:

  1. wav_writer is finishing the job of writing to the wav file (but task still exists)
  2. I2SMEMSampler sends msg (via a msg handler) to wav_write that a buffer is full & needs to be written
  3. msg arrives at wav_writer to wake task but wav_writer is finished & task no longer exists -> crash

I've pushed a new commit, I hope this catches the issue but will take some testing

EDsteve commented 6 months ago

@OOHehir Thanks Owen. I will do tests within the next days and report back. BTW. I am always compiling with esp32dev and not with esp32dev-ei. Is that okay?

OOHehir commented 6 months ago

@EDsteve, sure that's fine.

On Thu, 14 Dec 2023 at 05:25, EDsteve @.***> wrote:

@OOHehir https://github.com/OOHehir Thanks Owen. I will do tests within the next days and report back. BTW. I am always compiling with esp32dev and not with esp32dev-ei. Is that okay?

— Reply to this email directly, view it on GitHub https://github.com/LIFsCode/ELOC-3.0/issues/56#issuecomment-1855155869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSSOW4PRPEXATGARZJK3L3YJKETVAVCNFSM6AAAAABARBFVPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJVGE2TKOBWHE . You are receiving this because you were mentioned.Message ID: @.***>

EDsteve commented 6 months ago

@OOHehir Great. No reboots any more since your last commit. Looks good so far. Will close this issue. But will continue to test.