2019-01-22 07:32 AM
But how is structured, in detail, a FSM program? Basically, there is a data section, composed of a fixed part (same size for all the FSMs), and a variable part (size is specific for each FSM), and an instructions section, composed of conditions and commands. Both data and instruction sections registers details can be found at the link below.
As regards data section, the fixed part is made of 6 bytes at the beginning of each FSM where the user must specify the amount of resources he will use in the instructions section and some parameters useful to the interpreter. Some examples: ODR, HW configurations, etc (see p.23 in the attached link). The variable data section is composed by a variable number of bytes after the fixed data section where the user allocates the necessary space for the resources. Some examples: thresholds, hysteresis, masks, etc (see p.25 of the attached link).
The instruction section is another variable number of bytes after the variable data section where the user can define the algorithm by using available commands and conditions. Some examples: NOP (no operation), Tx (timer number x), GNTH1(negative threshold 1), etc (see p.31 of the attached link).
By now, these definitions could appear quite abstract, but if you follow the posts, you will find some practical examples and applications 😊