jlab-sensing / ENTS-node-firmware

Firmware for STM32 and ESP32 microcontrollers on the Soil Power Sensor board
MIT License
0 stars 3 forks source link

`test_fifo` unit tests fail #128

Open jmadden173 opened 3 weeks ago

jmadden173 commented 3 weeks ago

Describe the Bug The unit tests on main do not currently plass

To Reproduce Steps to reproduce the behavior:

Run pio test -e test -f test_fifo from the main branch. Received output

test/test_fifo/test_fifo.c:283: test_FramPut_BufferFull [PASSED]
test/test_fifo/test_fifo.c:284: test_FramPut_Sequential [PASSED]
test/test_fifo/test_fifo.c:285: test_FramPut_Sequential_BufferFull      [PASSED]
test/test_fifo/test_fifo.c:286: test_FramGet_ValidData  [PASSED]
test/test_fifo/test_fifo.c:287: test_FramGet_BufferEmpty        [PASSED]
test/test_fifo/test_fifo.c:288: test_FramGet_Sequential [PASSED]
test/test_fifo/test_fifo.c:171: test_FramGet_Sequential_BufferFull: Element 1 Expected 204 Was 0        [FAILED]
test/test_fifo/test_fifo.c:238: test_FramBuffer_Wraparound: Expected 0 Was -3   [FAILED]

Expected Behavior Test should pass

Screenshots N/A

Environment

Additional Context Could be an issue with either FramGet or FramPut. The error is reproducible on multiple boards.

jmadden173 commented 2 days ago

The old (FM24CL16B) and new (MB85RC1MT) fram chip actually share the same I2C memory space and therefore cannot be solder on the board together. Need to double check the tested to verify this is the cause of the issue.

References: https://www.fujitsu.com/jp/group/fsl/en/imagesgig5/MB85RC1MT-DS501-00027-4v0-E.pdf https://www.infineon.com/dgdl/Infineon-FM24CL16B_16-Kbit_(2_K_8)_Serial_(I2C)_F-RAM-DataSheet-v13_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ec99cb241e9