Custom code for F28379D being ignored in Simulink
1 view (last 30 days)
Hi, I am using the Simulink Coder/Custom Code/System Outputs block to add custom code to my F28379D project.
In particular I use the block to visualize the interrupt task by using the function declaration code to enable a GPIO, and the function exit code to disable it.
/*system output declaration*/
GpioDataRegs.GPBSET.bit.GPIO38 = 1;
/*system output extit code*/
GpioDataRegs.GPBCLEAR.bit.GPIO38 = 1;
The GPIO is properly setup in an initialize block.
Now the issue: When I use Build&Deploy&Start in Simulink the program does not set/clear the GPIO, but when I flash the same code in CCS it works! When I check the compiled code (in Simulink or CCS) the custom code is inserted at the correct location. It seems like Simulink generates the code correctly, but ignores it when building the project?
I have attached a minimum working example for a F28379D, with ePWM2 setup to periodically trigger a SCI transmit. The custom code is used to visualize the length and location of the interrupt by turning GPIO38 on. I am using Matlab 2021a, with CCS Version: 10.1.0.00010 on Windows10.