cancel
Showing results for 
Search instead for 
Did you mean: 

ISM330DHCX FSM Change DECTREE Value for CHKDT condition

arisloupas
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Federica Bossi
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.