2025-09-23 10:41 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?