Hi Szilard,
I understand that you are facing issues working with XCP CAN config in a Referenced Model in Normal Mode. In response to the error mentioned, it advocates the use of ssSetModelReferenceNormalModeSupport with the value MDL_START_AND_MDL_PROCESS_PARAMS_OK. It is worth noting that when a C S-function appears in a referenced model that executes in Normal mode, successful execution is impossible if all of the following are true:
- The S-function has both an mdlProcessParameters function and an mdlStart function.
- The mdlProcessParameters function depends on the mdlStart function.
- The referenced model calls mdlProcessParameters before calling mdlStart.
As per my understanding, error originates because mdlProcessParameters has dependency requirements that mdlStart has not satisfied. Examples of such dependencies include:
- Allocating memory in mdlStart and using that memory in mdlProcessParameters. This is often done using ssSetUserData and ssGetUserData.
- Initializing any DWork or any global memory in mdlStart and reading the values in mdlProcessParameters.
Going by the suggestion raised in the error, you can include the following statement in mdlInitializeSizes
ssSetModelReferenceNormalModeSupport(S, MDL_START_AND_MDL_PROCESS_PARAMS_OK);
Have a look at below references for better understanding
I hope this helps.