2024-04-18 01:52 AM
Hi,
I am trying to use the FSM of the ISM330DHCX to check multiple decision tree outputs from the MLC.
I want to be able to change the Decision Tree value in the CHKDT condition within the program flow, as I want to be checking multiple decision trees and outputs in the same FSM.
From the documentation, I understand that to do this, I need to use the SETP command to change the value of the DECTREE Byte. However, I cannot seem to find the right configuration for the SETP command to be able to change the expected Dec. Tree value.
Could you please point me in the right direction?
Specifically, what State Machine Address should I be selecting, and what value should I be writing to it, to change the Decision Tree and Decision Tree result in the CHKDT condition?
Thanks in advance.
Solved! Go to Solution.
2024-04-18 11:43 PM
Hi @arisloupas ,
Each FSM consists of 6 bytes (fixed data section) + X bytes (variable data section, depending on the resources declared in the fixed) + Y bytes (instruction sections). The SETP command is used to change the value of one byte of the individual FSM, and requires two arguments: the first is the address, relative to the fixed data section (so 0x00 will be CONFIG_A, 0x01 will be CONFIG_B, 0x02 will be SIZE, ...), the second is the value to be written.
Obviously it makes no sense to have a value <= 0x05 as the first argument (address), because that would mean you want to change something in the fixed. So depending on what you have declared in the fixed data section, you should put the address of the DECTREE byte in the variable data section as the address.
2024-04-18 11:43 PM
Hi @arisloupas ,
Each FSM consists of 6 bytes (fixed data section) + X bytes (variable data section, depending on the resources declared in the fixed) + Y bytes (instruction sections). The SETP command is used to change the value of one byte of the individual FSM, and requires two arguments: the first is the address, relative to the fixed data section (so 0x00 will be CONFIG_A, 0x01 will be CONFIG_B, 0x02 will be SIZE, ...), the second is the value to be written.
Obviously it makes no sense to have a value <= 0x05 as the first argument (address), because that would mean you want to change something in the fixed. So depending on what you have declared in the fixed data section, you should put the address of the DECTREE byte in the variable data section as the address.