C-Script Blocks Prevent DSP Flashing on LAUNCHXL-F28379D

Hi everyone,

I am using PLECS Coder with a LAUNCHXL-F28379D. My PWM outputs and SPI-A block work when I use fixed constant inputs, and I can see the SPI signals on the oscilloscope.

However, when I replace the constants with C-Script blocks, the model no longer builds/programs to the DSP. The C-Scripts work in offline simulation, but the DSP cannot be flashed when they are included.

Are there specific restrictions for using C-Scripts with the TI C2000 target?

Thanks.

Yes there are restrictions regarding C-Scripts. For example, the use of absolute time via the CurrentTime macro will by default generate an error. However there are many more possible reasons.

You will need to post a representative model and a description of the error message for more specific guidance.

I will try to provide more details. I do not receive any errors after flashing, but the flashing was unsuccessful because the signals I am probing are dead


So here, it works, and I can view the CLK signal from an oscilloscope. However, once I use a C-script to generate the same output, it doesn’t work.

You can attach PLECS models to your post. The contents of your C-Script and overall setup of your model are important details.

Okay, so just to test, I have no input signal and 3 output signals which match the constant blocks here

test2.plecs (191.3 KB)

I have attached the model, and the SPI setup. Is there any additional info you need?