Skip to main content
Explorer
September 20, 2024
Solved

MotionFX Library frequency : can work correctly with variable frequency or less than 100Hz ?

  • September 20, 2024
  • 1 reply
  • 670 views

Hi,

I am using MotionFX Library on stm32wl55 (CM4 without FPU). run at 48MHz (max frequency)

it is impossible to run MotionFX_CM4F_wc32_ot.a

so i use :MotionFX_CM3_wc32_ot.a and it is work.

 

by debugging, the MotionFX_manager_run function take different execution time in different cycles?. in general, it tack 1 or 2 ms for 3 or 4 cycles, than 10 to 15 ms for the 5th cycle ! (trying Oz and Ofast optimisation)

it is normal ?

in attachment a screenshot for fusion execution real time record.

 

 

the lowest recommended frequency on the UM2220 is 100Hz.

in my case it is just impossible to do faster !

so is the library can work correctly if i set a lower frequency ?

the third argument in MotionFX_manager_run(pdata_in, pdata_out, MOTION_FX_ENGINE_DELTATIME) can be a variable (set the real delta time between two execution)? because in ST examples it is always set to a fix value.

if you have other recommendation to reduce the time of execution, pleas tel me :)

 

Thank you,

Sincerely.

 

 

malarab_0-1726834502547.png

 

    This topic has been closed for replies.
    Best answer by malarab

    When MotionFX_manager_run takes more time, it is due to the MotionFX_update call.

    It is possible to reduce the number of calls by increasing DECIMATION.

    To process all data correctly and obtain the correct output from the sensor fusion algorithm, I read the data from the IMU when an interrupt occurs (INT1 is set when data is available), i save the data in a FreeRTOS queue, then it is processed later by a specific task

    1 reply

    malarabAuthorAnswer
    Explorer
    February 27, 2025

    When MotionFX_manager_run takes more time, it is due to the MotionFX_update call.

    It is possible to reduce the number of calls by increasing DECIMATION.

    To process all data correctly and obtain the correct output from the sensor fusion algorithm, I read the data from the IMU when an interrupt occurs (INT1 is set when data is available), i save the data in a FreeRTOS queue, then it is processed later by a specific task