Initialize value for compatible Data Store Block

7 ビュー (過去 30 日間)
xian zhao
xian zhao 2018 年 10 月 21 日
According to ecoder_autosar manual, I generate a model to model the BSW service call. In the model there is a data store block named "A", and the initial value is 2. After code generation, I found the block "A" is declare however the initialize is implemented during the SWC initialize. I wonder if there is any problem in case there is a logic change the value stored in ROM during operation or by calibration, the initialize procedure will change the value located in RAM which is loaded from ROM since the initial valued build in code is still unchanged.
19 /* Exported block states */
20 uint8_T A; /* '<Root>/Data Store Memory' */
81 /* Model initialize function */
82 void Runnable_Initialize(void)
83 {
84 /* Start for DataStoreMemory: '<Root>/Data Store Memory' */
85 A = 2U;
86
87 /* SystemInitialize for Atomic SubSystem: '<Root>/Runnable_Initialize' */
88 /* StateWriter: '<S1>/State Writer' incorporates:
89 * Constant: '<S1>/Constant'
90 */
91 rtDW.Integrator_DSTATE = 1.0;
92
93 /* End of SystemInitialize for SubSystem: '<Root>/Runnable_Initialize' */
94 }

回答 (0 件)

カテゴリ

Help Center および File ExchangeAUTOSAR Blockset についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by