Skip to main content
SYama.3
Associate
December 3, 2020
Solved

Configuration of MLC sensors

  • December 3, 2020
  • 3 replies
  • 1904 views

I am playing with my STWIN evaluation kit and I am trying to understand the final step of configuration of the Machine Learning Core in the sensor.

Are the configuration registers on the sensor flashed like that of an MCU when you load the ucf file? Is the sensor configured every time by the MCU upon reset?

I ask because I am trying to use an MLC sensor in my design where it would be interfaced to am MCU where you program in Micropython. It would take some time to write equivalent drivers.

This topic has been closed for replies.
Best answer by Eleon BORLINI

Hi @SYama.3​ ,

I don't know if I catch your point, but you can write the .ucf file data (containing the register value and the corresponding value to be written), in the standard way, i.e. via I2C or SPI communication.

You can consider for instance the configuration examples available on Github, where you can find the casting of an .ucf file into a .h file for C language.

lsm6dsox_yoga_pose_recognition.ucf --> lsm6dsox_yoga_pose_recognition.h

You should convert .ucf file into python file as you would do for a standard configuration of the STWIN IMU device.

-Eleon

3 replies

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
December 3, 2020

Hi @SYama.3​ ,

I don't know if I catch your point, but you can write the .ucf file data (containing the register value and the corresponding value to be written), in the standard way, i.e. via I2C or SPI communication.

You can consider for instance the configuration examples available on Github, where you can find the casting of an .ucf file into a .h file for C language.

lsm6dsox_yoga_pose_recognition.ucf --> lsm6dsox_yoga_pose_recognition.h

You should convert .ucf file into python file as you would do for a standard configuration of the STWIN IMU device.

-Eleon

SYama.3
SYama.3Author
Associate
December 3, 2020

Thanks. Is it a one-time operation or does it need to be written after every reset/power-up?

Eleon BORLINI
ST Employee
December 4, 2020

Registers are in volatile memory, so you should re-write them after every power on.

If the answer helped you to solve the issue, please select that as "Best Answer" to help future community users with similar issues.

-Eleon

SYama.3
SYama.3Author
Associate
December 3, 2020

It is much clear now. I read through the C driver example. You do have to configure it before entering the main loop. Thanks for the help.