2020-11-05 09:59 PM
my mcu is STM32F730R8Tx
sensor: LSM9DS1
use CubeMx gen code, with Makefile(under linux env)
I use lsm9ds1_reg.c as sensor driver fetch raw data, and it worked fine.
then, do the following as MotionFX lib documents:
I can run the code, and i can get ther version code by MotionFX_GetLibVersion(): ST MotionFX v2.4.1
But, if i enable MotionFX_propagate() in the following routie, MCU will enter Hard Falut ISR...
if (is_imu_xl_gy_drdy())
{
MFX_input_t raw;
MFX_output_t out;
imu_getdata(&raw);
// curr_tick = HAL_GetTick();
// deltatime = (curr_tick - last_tick)/1000.0;
// last_tick = curr_tick;
deltatime = 0.01;
if (0)
{
len = snprintf(buf, 256, "%4.2f %4.2f %4.2f | %4.2f %4.2f %4.2f | %4.1f %4.1f %4.1f\n", raw.acc[0], raw.acc[1], raw.acc[2], raw.gyro[0], raw.gyro[1], raw.gyro[2], raw.mag[0], raw.mag[1], raw.mag[2]);
CDC_Transmit_FS(buf, len);
}
MotionFX_propagate(&out, &raw, &deltatime);
}
I have enable CRC in cubemx.
in Makefile, i did some change:
in STM32F730R8Tx_FLASH.ld
=============
But why HardFalut once calling MotionFX_propagate ?
Thank thee very much!!
2020-11-06 08:39 AM
Hi @MMa.1893 ,
It seems so far that everything is fine in your configuration code. Could you please share which version of X-CUBE-MEMS1 or MotionFX library are you using?
Although the MotionFX library is device independent, it is typically used in combination with STM32F4 motherboards.
For this reason, I reported your question internally and we have to double-check the functionality of this function on Cortex-M7.
-Eleon
2020-11-08 06:06 PM
Hi, Eleon
i can get ther version code by MotionFX_GetLibVersion(): ST MotionFX v2.4.1
in STM32CubeMX X-CUBE-MEM1, "Drivers and sample application for MEMs components" version is 8.1.1
2020-11-09 01:27 AM
Thanks for the feedback @MMa.1893 .
I actually have to correct myself regarding the above sentence "it is typically used in combination with STM32F4 motherboards", since these libraries are provided compiled for Cortex-M0, M3, M4 and M7, so they should work with all the MCU families.
-Eleon
2020-11-09 01:47 AM
so .... why my code fault ?
2020-11-09 01:49 AM
We are currently check, and we'll come back to you as soon as possible.
-Eleon
2020-11-09 01:53 AM
Thank thee very much!
i can send you my design if you need.
2020-11-09 02:09 AM
Yes, of course, you can share it here or in the Message section of the community.
Thanks,
-Eleon
2020-11-09 02:19 AM
ok i have message you, hope it can be solved asap:smiling_face_with_halo:
2020-11-11 03:51 AM
Hi @MMa.1893 ,
Our experts have validated that the library is working on NUCLEO- F767ZI, so they believe the library is OK.
About your shared project, there looks like there are many lines put in comments, so it is not clear what was used and what not.
Is it possible for you to create a simple project with only the library and test it? And, if possible, we can also check the input data which are passed to the library.
-Eleon