2025-06-23 4:31 AM - last edited on 2025-06-23 5:56 AM by Peter BENSCH
How can I save the magnetometer calibration offset in ISPU, if lsm6dso16is is connected to a stm32l4.
2025-06-26 6:35 AM
Hi @Amith_lal ,
Are you using the the LIS2MDL as external magnetometer sensor?
2025-06-27 2:12 AM - edited 2025-06-27 2:13 AM
Yes @Federica Bossi
2025-09-23 2:46 AM
I am developing firmware for the ISPU on the LSM6DSO16IS and have a question regarding communication between the host MCU and the ISPU core.
My objective is to persist magnetometer calibration data. My intended workflow is:
The ISPU runs the MotionMC_update function and calculates the HI_bias values.
The host MCU reads these HI_bias values from the ISPU's output registers and saves them to non-volatile memory.
On the next device startup, the host MCU writes the saved HI_bias values into the ISPU_DUMMY_CFG registers, intending for the ISPU to use them as initial calibration data.
I have successfully implemented step 3. I can write to the ISPU_DUMMY_CFG_1 register from my external STM32 host using the lsm6dso16is_ispu_write_dummy_cfg() function, and I can verify the write was successful by reading it back from the host with lsm6dso16is_ispu_read_dummy_cfg().
The problem occurs when the ISPU firmware itself tries to read this value. When I attempt to read the ISPU_DUMMY_CFG_1 register from within the ISPU code, it always returns 0x0000, not the value written by the host.
Here is the simplified code snippet from my ISPU algo_00_init function that demonstrates the issue:
uint16_t read_value = 0;
read_value = cast_uint16_t(ISPU_DUMMY_CFG_1);
Since the register is clearly accessible from the external host but not readable by the ISPU core, I suspect there may be a specific initialization step or access permission I am missing within the ISPU firmware to enable this communication path.
Could you please advise on the correct procedure for the ISPU to read the ISPU_DUMMY_CFG registers after they have been set by a host MCU?
2025-09-23 8:57 AM
Store the offsets in STM32L4 flash (or external NVM), then load them into the ISPU at startup through its registers/memory map.
2025-09-23 10:42 AM
Ya I did that my problem is in reading the input registers from ispu