Firmware crashing after adding sensor FP-SNS-DATALOG2 Steval-STWINBX1
Hello everyone,
I’m working on a custom version of the FP-SNS-DATALOG2 firmware and attempting to integrate a new sensor, LSM6DSV320X, which is available on the STEVAL-SensorTile.Box Pro but not on the STEVAL-STWINBX1.
To add support for this sensor, I performed the following changes:
- Added Drivers/BSP/Components/lsm6dsv320x/lsm6dsv320x_reg.c/.h
- Integrated corresponding PnPL + App Model .c/.h files
- Added that sensor task
- Modified:
- DatalogAppTask.c/.h
- App.c/.h
- sysdebug_conf.h
- SensorManager_conf.h
- HardwareDetect.c/.h
- Updated existing DTM(Device Template Model) from stdatalog-pysdk pnpl module(FP-SNS-DATALOG2-9.json) to include the new sensor
- Removed ism6hg256x from the build
With these changes, I’m able to start logging using a custom device template, and the sensor appears to work initially. However, the system becomes unreliable after a reset.
Main Issue
The board operates correctly until it is reset. After reset, I encounter multiple faults, including:
- HardFaults
- Bus faults
- Memory management faults
- Usage faults (forced)
- Precise data access violations
- Occasional unaligned access faults
(See attached screenshots for details.)
What I Tried
I suspected a memory issue, so I increased the ThreadX byte pool (TX_BYTE_POOL) from 565 KB to 570 KB, but this did not resolve the problem.
Questions
- Could this be due to incorrect memory configuration or alignment issues?
- Is there some required initialization or configuration step I might be missing?
- Is the system tightly configured for the original onboard sensors in a way that affects adding external ones?
I’ve also attached the project archive with my modifications for reference.
Any insights or suggestions would be greatly appreciated.
Thank you in advance,
George Kryshco
