X-CUBE-MEMS1 Middleware initialization problem
Hi,
I am using a Nucleo-F446RE board with an IFS01A2 to build an eCompass.
I have built a project using CubeMX v5.2.1 and Atollic Truestudio v9.1.
To start with I made sure that I was able to communicate with the different mems sensors and I am successfully receiving acceleration and magnetometer data from the LSM303AGR so I know that the boards and toolchain work as expected.
I have included the MotionEC_CM4F_wc32_ot library which I believe I need for the F446 and the header file. I have also enabled the CRC in CubeMX.
I can successfully call functions like MotionEC_GetLibVersion or MotionEC_SetFrequency which build and run as expected.
My problem starts when I try to call MotionEC_Initialize. This builds but will not run and results in a HardFault. I can't see what is causing the fault. Can anyone suggest what I might be doing wrong.
Much appreciated
Nev
Update:
Digging further it appears that the fault is:
Bus, memory management or usage fault.
Attempt to perform an unaligned access
I have no idea what this means!
