Skip to main content
Lixin Tang
Associate
April 21, 2017
Question

How to add variables to a Matlab/simulink model based on STM32-MAT ?

  • April 21, 2017
  • 1 reply
  • 1529 views
Posted on April 21, 2017 at 22:29

Greetings,

I am new to STM32-MAT code generation. I made 2 small models and they are working as expected.

However, I found a big issue when I try to build a more complicated model - there is no variable (memory copy) in the library. I can read/write values to/from register of the STM32F100. But sometimes, I need to define/use a lot of variables in the model. Just wondering how do you guys handle this situation? Maybe there is one block that is hiding somewhere?

Many thanks and have a great weekend!

Lixin

    This topic has been closed for replies.

    1 reply

    F J
    Visitor II
    June 11, 2017
    Posted on June 11, 2017 at 16:58

    Hi Lixin

    You can use the 'Data Storage Memory' block in Simulink.

    It is treated as global variable in the generated C code.