How can I profile a Simscape Electrical Model for C2000 MCU?

I have a simple buck converter model adapted to run on a C2000 (F28379D LaunchPad XL) using the C2000 MCU blockset, which just runs fine there. Now I want to see how much CPU time it consumes using the "Hardware Profiler" block and placing the model in a function-call subsystem. When I now try to compile the model, I get an error:
"Error:Goto/From connections cannot cross nonvirtual subsystem boundaries. The only exception is when a goto is connected to a state output port"
I've attached the model that throws the error.
How can I create a model using "powergui" that is suitable for profiling on the C2000 platform?
Many thanks in advance!

 Accepted Answer

many thanks for your explanation. I changed all Goto/From blocks in my model. Now the on ly ones that remain are the ones generated by powergui during compilation. I tried moving the powergui into the function. This solves the problem with the Goto/From pairs, but now the time step needs to be inherited which is not possible for powergui (and most blocks in Simscape/Electrical).
I'd appreciate any hints on how to use Simscape/Electrical in triggered functions as I'm interested in determining execution time on FPGAs and MCUs.
Again, many thanks for your efforts!
Best,
Jens

2 Comments

many thanks for the links to alternative profiling methods. I'll try them and see what works best with simscape electrical.
Best,
jens

Sign in to comment.

More Answers (0)

Products

Release

R2024b

Asked:

on 1 Apr 2025

Edited:

on 4 Apr 2025

Community Treasure Hunt

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

Start Hunting!