Initialize value for compatible Data Store Block
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur AUTOSAR Blockset dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!