is it possible to inline C2000 (F28379D) legacy code for CLA usage
0 个评论
回答(5 个)
1 个评论
1 个评论
Hi Alexander,
You are close. By default GPIOs are controlled by the CPU and the CLA doesn't have access the registers. As of today, our GPIO block only works from the CPU. We are working on enhancing this for the future. In the meantime, just use a simple line of custom code to change the master that has access to the GPIO registers. Something like (for GPIO16):
EALLOW; GpioCtrlRegs.GPACSEL3.bit.GPIO16 = 1; // 0=CPU1, 1=CPU1.CLA1, 2=CPU2, 3=CPU2.CLA EDIS;
To include custom code easily, I recommend the custom code blocks from Simulink Coder.
Section 7.9.2.12 of the F28379D reference manual explains that part.
From your models, I see that you are using MATBA R2017b. I strongly recommend that you upgrade to MATLAB R2018a, which provides multiple enhancements to our CLA support.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!