LSM6DSOX MLC Fails to Initialize - MLC0_SRC always 0x00
Hi, ST Community,
I am working with an LSM6DSOX on a custom board, using an ESP32S3 with the Arduino framework, and I'm unable to get the Machine Learning Core (MLC) to run.
The problem is that the output register MLC0_SRC (0x70) always reads 0x00. I am also monitoring the is_mlc_ok status bit in the EMB_FUNC_STATUS register (0x15), and it never gets set to 1. Basic communication (reading WHO_AM_I and raw accelerometer data) works perfectly.
I am not using a library and am writing directly to the registers. My initialization sequence is as follows:
- Software Reset: Write 0x01 to CTRL3_C (0x12).
- Wait: A 100ms delay to ensure the reset is complete.
- Enable Embedded Functions Access: Write 0x80 to FUNC_CFG_ACCESS (0x01).
- Load UCF Data: Write the entire .ucf file (288 bytes) byte-by-byte by setting the address in MLC_A_ADD (0x02) and writing the data to MLC_B_ADD (0x03). I have verified the data is being written.
- Disable Embedded Functions Access: Write 0x00 to FUNC_CFG_ACCESS (0x01).
- Enable MLC: Write 0x10 to EMB_FUNC_EN_A (0x04).
- Enable Accelerometer: Write 0x20 to CTRL1_XL (0x10) to set the ODR to 26 Hz, which matches the .ucf configuration.
Has anyone else had this problem? Is there any command or register write missing that could explain why the MLC is not starting? Or do these symptoms strongly point towards a hardware-level issue?
Thank you for your time.
