Hello guys,
I am facing an issue in building a Simulink model with TI C2000 blocks. My MATLAB version is R2019b and code composer studio version is 9.30. I am using a custom TMS320F28335 board with external 1Mx16 SRAM.
Let me give a brief overview about my model,
Signal from ADC block with single data type is passed into buffer of length 20k sample points. The buffer is connected to a MATLAB function block where further processing is carried out. The code relevant to the issue is shown below. The function argument Vib gets value from buffer and then 18k points from the variable Vib is copied to another variable temp_sig, after which further processing is carried out.
functionFDD_data = fast_function(xx,xx,Vib)
temp_sig=single(zeros(18000,1));
temp_sig=Vib(2001:20000);
:
When I build the model, I get the following error,
“'BWWT_2pole_final/Acceleration_buffer/Buffer1' uses a matrix with 40000 elements, which is larger than the maximum value of 'int' for the specified target. For information on workarounds to this error see External Bug Report 704491.” I cannot understand why the error shows there are 40k elements, although there are only 20k elements in the buffer.
I broke the connection between buffer with 20k length and the MATLAB function. Then initialized a dummy variable inside the function as follows
functionFDD_data = fast_function(xx,xx)
Vib=single(zeros(20000,1));
temp_sig=single(zeros(18000,1));
temp_sig=Vib(2001:20000);
:
In this case the model builds without any error. So, I guess, there is some issue in building my model in Matlab2019b.
Note: This model which I am trying to build in MATLAB 2019b was working perfectly in MATLAB 2011b without any issues. In MATLAB 2011b, I built, deployed in the hardware and verified the functionalities of the code.
I appreciate anybody who can help me to sort out this issue. Thanks in advance.
Regards,
Subash