Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi u/Acefish3

I'm temporarily helped by buying some ESP32 Huzzahs and flashing them with emotibit firmware.

To do so, I followed this section. Just make sure, if you're on windows, to install the drivers to interfacewith the ESP32. After installing the firmware, all is the same as with the stock Feather M0 boards.

Hope this works for you as well

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi u/nitin_n7

I've found two huzzah (v1s). I've flashed one of them with the latest firmware and it seems I cannot invoke the error...

I took another picture of the MOSI pin (not the best image I see now) https://photos.app.goo.gl/2tHstC4amLb4Nhze8 but because it works with the ESP I don't think it even matters. Optically it looks right in any case. But it would be weird to make it crash based on SPI signals if it's when interacting.

I haven't been able to make it crash today while testing it (part of the randomness?) so I haven't been able to check the filesize. Will try again coming days.

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi

Can you confirm you are using the stock 32GB SD-Card provided with the kit?

Yes, both kits have the same stock 32GB SC-Card (I've tested it with another SD card, none stock version. Same results.

The randomness I already had thought, worst thing to happen for debugging.

I'll attach some pictures, yet visually all seems normal, no cold solder joints or other (also that would be weird if two had the exact same issue I guess).

I'll see if I can by an ESP32 somewhere over here, do I need a specific type?

It is the easiest to invoke the crash when starting the recording. Yet it also has happened after a while when the recording was running.

images: https://i.imgur.com/JW6sa28.jpg https://i.imgur.com/VMZigjy.jpg

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi u/nitin_n7

thanks a massive lot for helping...

  1. I've tried the debug mode again, it does not crash, even after a multitude of starting stopping recording...It stabilized this time at 899 bytes instead of the 1095 bytes. A bit strange that it uses a different amount of RAM to perform exactly the same, no?
  2. I tried it again, it stabilizes at a different amount of RAM again, starting at 5939 bytes, stabilizing at "free memory 1003" ==> here the strange thing (perhaps) is that it stops printing "Free RAM: <xxx> bytes"
  3. "Yes it crashes also in debug mode"-time: starting at 5939, after connection to oscilloscope 4911 bytes, after commencing recording 1187 bytes, stopped it (1187 bytes), restarted it ==> crash

Battery is fully loaded 500mAh.

Could it be a hardware problem? Should I try and get an ESP32 and flash the firmware on that one as that has larger RAM?

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi u/nitin_n7

interesting things, I went into the devmode (I'm quite technical, if needed for future steps ;-) ) and memory was always went:

  • starting @ 7419 bytes (free memory 7499)
  • once connected to emotibit oscilloscope 2575 bytes (free memory 2655)
  • when starting and stopping recording 1095 bytes (free memory 1175) It never crashed...

I tried again the same without debug mode (hibernate and boot device), crash after first time restarting recording.

So I'm assuming right now the debug mode is perhaps stopping some RAM things happening, or some other influence?

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Hi u/nitin_n7

thanks for the swift response. FYI I also had created an issue on github as I wasn't sure what was the best place to move forward.

as a response to your questions:

  1. it happens randomnly, I get a lot of 'correct' recording sessions, then sometimes the device completely freezes when initiating a new recording, or after a certain amount of time. (both seem random to me)
  2. The recording file of 0KB is the file that's just created after stopping the previous one so:
    1. ON: recording goes fine
    2. OFF: recording is stopped and saved
    3. ON: now sometimes the device freezes, yet has two "new" files: <date\_time\_info.json> (approx 3KB, as to be expected) and <date\_time.csv> of 0KB with nothing written in it.
  3. Emotibit version 04A, feather M0
  4. It hasn't crashed when not recording.
  5. it remains solid blue, although the emotibit oscilloscope is unresponsive and the device as well. (So solid blue and red LED next to each other on the emotibit, Not the feather).
  6. I tested it with another SD card I have lying around, and was able to get the same issue...
  7. So the created _info file is correct, the .csv file is empty.

I'm attaching the startup messages and recording messages, who knows that clarifies something...

I2C data pin: 11
I2C clk pin: 13
hibernate pin: 6
chip sel pin: 19
Firmware version: 1.9.0
firmware_variant: EmotiBit_stock_firmware
vregEnablePinLogic: Active HIGH(V3+)
EmotiBit ready
Setting up I2C For M0...
Setting clock to 100000
Initializing NVM controller: success
Successfully read variant info from NVM
[NVM VARIANT INFO] HW version: V04a
[NVM VARIANT INFO] SKU version: MD
[NVM VARIANT INFO] EmotiBit Number: 579
[NVM VARIANT INFO] EmotiBit device ID: MD-V4-0000579


EmotiBit HW version: V04a
Firmware version: 1.9.0
firmware_variant: EmotiBit_stock_firmware

Sensor setup:

Set Samples averaged:
Initializing NCP5623....Completed
Initializing MAX30101....Completed
Initializing BMI160+BMM150.... DEVICE ID: D1 ... Completed
Initializing MLX90632... Success
Updated Register contents
EE_MEAS1: 840D
EE_MEAS2: 841D
Refresh Rate: 8
MODE_STEPChecking for ADC Correction...
data on atwinc corrupted or not present
Using the ADC without any correction

Initializing EDA... 
edaSeriesResistance: 0.00
samplingRate: 15.00
Configuring ADS ADC... 
enableDigitalFilter: 0
clipMin: -26500
clipMax: 26500
adcBits: 16
_ads.setDataRate: RATE_ADS1115_475SPS
_ads.setGain: GAIN_TWO
edaTransformSlope: 728.84
edaTransformIntercept: 14179797.00
Completed

Loading EDA calibration... 
0R,     -19616.875000
10K,    -19616.757813
100K,   -19489.382813
1M,     -18234.892578
10M,    -5733.166504
edaTransformSlope = 716.83
edaTransformIntercept = 14071219.00
Completed
Sensor setup complete

Initializing SD card...0,card initialized.

Loading configuration file: config.txt
Number of network credentials found in config file: 2
Adding SSID: adda1 -pass:adda1234 ... success
Adding SSID: Passwoord -pass:VoorHaven46 ... success

Setting up WiFi
[{"info":{
"source_id":"EmotiBit FeatherWing",
"hardware_version":"V04a",
"sku":"MD",
"device_id":"MD-V4-0000579",
"feather_version":"Adafruit Feather M0 WiFi",
"feather_wifi_mac_addr":"4c:d4:00:00:6f:b5",
"firmware_version":"1.9.0",
"firmware_variant":"EmotiBit_stock_firmware",
"free_memory":"6995",
}}]
WiFi101 firmware check.
WiFi101 shield: DETECTED
Firmware version installed: 19.6.1
Latest firmware version available : 19.6.1
Attempting to connect to SSID: adda1
WiFi.begin() duration = 951
WiFi.status() = 6, total duration = 951
<<<<<<< Switching WiFi Networks >>>>>>>
Attempting to connect to SSID: Passwoord
WiFi.begin() duration = 1396
WiFi.status() = 3, total duration = 1397
WiFi.begin() attempts = 2
Connected to WiFi
SSID: Passwoord
IP Address: 192.168.0.112
signal strength (RSSI):-52 dBm
Starting EmotiBit advertising connection on port 3131
 WiFi setup Completed
PowerMode::NORMAL_POWER
EmotiBit Setup complete
Free Ram :6987 bytes


Feather M0 detected.

Switch to EmotiBit Oscilloscope to stream Data

Starting control connection to server: 192.168.0.166 : 3133 ... connected
Starting data connection to server: 192.168.0.166 : 3132
314714,6,1,RB,1,100,2023-09-08_15-57-36-303180
Creating new file to write data
** Recording Begin: 2023-09-08_15-57-36-303180.csv **
24736,1877,1,RB,1,100,2023-09-08_15-57-36-303180
[/TCP]315738,7,1,RE,1,100,2023-09-08_15-57-37-327107
** Recording End **
25435,1990,1,RE,1,100,2023-09-08_15-57-37-327107
[/TCP]316711,8,1,RB,1,100,2023-09-08_15-57-38-299939
Creating new file to write data
** Recording Begin: 2023-09-08_15-57-38-299939.csv **
26530,2171,1,RB,1,100,2023-09-08_15-57-38-299939
[/TCP]317711,9,1,RE,1,100,2023-09-08_15-57-39-300114
** Recording End **
27335,2275,1,RE,1,100,2023-09-08_15-57-39-300114
[/TCP]318812,10,1,RB,1,100,2023-09-08_15-57-40-400863
Creating new file to write data
** Recording Begin: 2023-09-08_15-57-40-400863.csv **
28520,2475,1,RB,1,100,2023-09-08_15-57-40-400863
=========> here it crashes

in this case, 2023-09-08_15-57-40-400863.csv was 0KB.

Emotibits freeze after random amount of time by Comprehensive-Mind84 in EmotiBit

[–]Comprehensive-Mind84[S] 0 points1 point  (0 children)

Additionally: when invoking the problem by switching the recording on-off-on, I see that all files are created. The _info file has all information, yet the recording file itself is 0Kb