S-function - related Code Generation problem with the LaunchPad F28379D

3 vues (au cours des 30 derniers jours)
Hello,
I am trying to build an S-function for reading the "CANB Error and Status" register of the LaunchPad F28379D. The Simulink generates code and the program is loaded to the target properly. But, I dont get the correct output when it is executed on the target. When I am importing the generated Project in CCS and build it ,I get a warning for the output variable of the S-function block. "a value of type "uint32_t" cannot be assigned to an entity of type "uint32_T *". After modify the wrapper function, by removing the pointer input argument completly and assign a global variable for returning the result of the function, I was able to get the desirable result. A dropbox link include a file with the project data. Test Any help will be appreciated.

Réponse acceptée

Mark McBroom
Mark McBroom le 28 Avr 2018
y is a pointer. You need to dereference y when assigning a value to it. Change your code to this:
*y = CANStatusGet(CANB_BASE, CAN_STS_CONTROL);
  1 commentaire
Kyriakos Sampatakakis
Kyriakos Sampatakakis le 28 Avr 2018
Hello Mark, Thank you for your response. It seems to resolve my issue!
Best regards

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware 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!

Translated by