Bug: Reading extreme values and LoadProhibited exception - bzundel/IDIoT GitHub Wiki
The bug described in the following is worthy to be documented and must be researched further. An exact cause for the bug is yet to be determinined, but it can be replicated somewhat reliably by generating and immediately building and flashing with:
just clean test && make -C out/PATH/TO/NODE
Randomly values looking like INT_MIN
and INT_MAX
are returned by the sensor, and sometimes zeroes. In cause of extreme end of values, it results in a LoadProhibited
exception, which tells that there is some operation occuring on an invalid memory address [1]. Rebooting the ESP-
32 solves the issue (most of the time?).
Update
A more extensive test of letting the sensor read for ~30 minutes (at 1 read/3 seconds = 600 requests) shows that only the issue of reading zeroes (11.17% of all reads) apprears during normal execution. This might actually be some issue with the sensor; will replace and test again. The LoadProhibited
exception must therefore be some issue in the flashing/bootstrapping process?
Example
2025-03-22 02:09:22,465 # main(): This is RIOT! (Version: 2025.01-devel-324-g91d58)
2025-03-22 02:09:23,415 # WiFi connected to ssid REDACTED, channel 6
2025-03-22 02:09:24,921 # Waiting 5 seconds for sensor stabilization...
2025-03-22 02:09:29,939 # Raw read: 10
2025-03-22 02:09:29,947 # 10000000000000000213204190094543968723012578712679649467743338496.00
2025-03-22 02:09:30,100 # Successfully published "10000000000000000213"
2025-03-22 02:09:33,103 # EXCEPTION!! exccause=28 (LoadProhibitedCause) @800d0141 excvaddr=0a0c00c0