2024-11-15 08:12 AM - edited 2024-11-19 12:23 PM
I am looking at the LSM6DSV16X MLC examples in the MLC Git Repo.
I am confused by some of the register settings. For example, in lsm6dsv16x_six_d_position.h
const ucf_line_t lsm6dsv16x_six_d_position[] = {
{.address = 0x10, .data = 0x00,},
{.address = 0x11, .data = 0x00,},
{.address = 0x01, .data = 0x80,},
// many lines deleted
{.address = 0x02, .data = 0x31,},
{.address = 0x08, .data = 0x8E,}, // PAGE_ADDRESS: Address 0x8E not in the data sheet
I cannot find the address (0x8E) in the data sheet. I'm obviously missing something in my understanding.
Any insights, guidance would be appreciated
2024-11-22 12:44 AM
Hi @skafka ,
Examples found in the MLC official GitHub repositories have been generated using MLC tool (either via MEMS Studio GUI or via CLI using STEdgeAI --target mlc. They contain configuration specific to MLC to enable filter/feature computation and decision tree logic directly in HW, since are quite specific procedures we don't support writing those configuration by hand but only via the cited tools.
You may notice somewhere in the array of configuration "Ac 01 80", you can look up register FUNC_CFG_ACCESS (01h), by setting bit EMB_FUNC_
REG_ACCESS, every successive writes goes into a different area of register memory that we call "Embedded functions" where the use can select many advanced features, such as MLC and FSM configuration.
Going further down, you may find "Ac 02 X0" , when in embedded function mode, 02h now is the PAGE_SEL (02h) register, and allows you to select write to a specific page of memory by choosing "X", after this, the command "Ac 08 YZ" writes to PAGE_ADDRESS (08h) register, where you can write the specific address "YZ" in the page to write to. From this point onward any "Ac 09 KW" will write value "KW" in page "X0" at address "YZ", any other "Ac 09 .." will also automatically increase the address by 1. You can expect all HW specific stuff regarding MLC/FSM to be in all of that "Ac 09 .." writes, and, as long as you generates configuration using ST MEMS software tools, the configurations is guaranteed to do what you expect.
Hope that clear things up :)