This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I use a Texas Instruments F28335 ControlCARD with CCS v5. I've configured everything in Matlab to create C-Code for the Controller.
Now, I want to use the External Mode over Serial Communication (USB). There is a good help in the Matlab Documentation help
I follow the instruction, but at point four I can't go on:
"4. Navigate to the Coder Target > Groups > External mode"
I have no subitem "external mode"!
What is the reason for that? Is there any step in the instruction or any toolbox missing?
Additional: I've a student license with the following toolboxes:
MATLAB Version 8.4 (R2014b)
Simulink Version 8.4 (R2014b)
Aerospace Blockset Version 3.14 (R2014b)
Aerospace Toolbox Version 2.14 (R2014b)
Bioinformatics Toolbox Version 4.5 (R2014b)
Communications System Toolbox Version 5.7 (R2014b)
Control System Toolbox Version 9.8 (R2014b)
Curve Fitting Toolbox Version 3.5 (R2014b)
DSP System Toolbox Version 8.7 (R2014b)
Data Acquisition Toolbox Version 3.6 (R2014b)
Embedded Coder Version 6.7 (R2014b)
Fixed-Point Designer Version 4.3 (R2014b)
Fuzzy Logic Toolbox Version 2.2.20 (R2014b)
Gauges Blockset Version 2.0.9 (R2014b)
Global Optimization Toolbox Version 3.3 (R2014b)
Image Acquisition Toolbox Version 4.8 (R2014b)
Image Processing Toolbox Version 9.1 (R2014b)
Instrument Control Toolbox Version 3.6 (R2014b)
MATLAB Builder EX Version 2.5.1 (R2014b)
MATLAB Builder JA Version 2.3.2 (R2014b)
MATLAB Coder Version 2.7 (R2014b)
MATLAB Compiler Version 5.2 (R2014b)
MATLAB Report Generator Version 4.0 (R2014b)
Model Predictive Control Toolbox Version 5.0 (R2014b)
Neural Network Toolbox Version 8.2.1 (R2014b)
OPC Toolbox Version 3.3.2 (R2014b)
Optimization Toolbox Version 7.1 (R2014b)
Parallel Computing Toolbox Version 6.5 (R2014b)
Partial Differential Equation Toolbox Version 1.5 (R2014b)
RF Toolbox Version 2.15 (R2014b)
Real-Time Windows Target Version 4.5 (R2014b)
Robust Control Toolbox Version 5.2 (R2014b)
Signal Processing Toolbox Version 6.22 (R2014b)
SimDriveline Version 2.7 (R2014b)
SimMechanics Version 4.5 (R2014b)
SimPowerSystems Version 6.2 (R2014b)
SimRF Version 4.3 (R2014b)
Simscape Version 3.12 (R2014b)
Simulink 3D Animation Version 7.2 (R2014b)
Simulink Coder Version 8.7 (R2014b)
Simulink Control Design Version 4.1 (R2014b)
Simulink Design Optimization Version 2.6 (R2014b)
Simulink PLC Coder Version 1.8 (R2014b)
Simulink Real-Time Version 6.1 (R2014b)
Simulink Report Generator Version 4.0 (R2014b)
Simulink Verification and Validation Version 3.8 (R2014b)
Stateflow Version 8.4 (R2014b)
Statistics Toolbox Version 9.1 (R2014b)
Symbolic Math Toolbox Version 6.1 (R2014b)
System Identification Toolbox Version 9.1 (R2014b)
SystemTest Version 2.6.8 (R2014b)
Wavelet Toolbox Version 4.14 (R2014b)
Hello,
thanks for answers !!!
I have contacted the Matlab Support and they answered:
"1. The documentation you are referring to is for R2015a.
2. The MATLAB you are working with in R2014b.
3. The capability for 'Signal Monitoring and Parameter Tuning with External Mode' is available from R2015a, so that is why you do not have the option."
So, I upgraded to R2015a and there is the function and it works !!!
Now, I have a second question:
In the matlab link I have sent, stands:
"Increasing the Duration allows the capture of large real-time buffers. These buffers use heap section to allocate memory. A high value of Duration may result in Not enough memory on the target to process the packet warning, and consequently cause no data to be uploaded from the target to the host computer. To overcome this warning, specify a larger heap size if your target has sufficient memory. To change the heap size, go to the Model Configuration Parameters > Code Generation > Build Configuration > Specifyand modify the value for the option '--heap_size'."
When I increase the "Duration" to much, then the mentioned error occurs:
Not enough memory on the target to process the packet
When I increase the "heap size" to much (over 0x3000), then the following error occurs during the building process:
Failed to generate all binary outputs
Is there any possibilty to enlarge the "heap size" ???
I've found the following possible solution:
"The reason for this is that the on-chip RAM on TI C2000 parts has 2 main sections. The first one is 2K and located at 0-0x7FF. The second one starts at 0x8000 and comes in different lengths depending on the particular part. The F28069 2nd RAM partition is 48K and runs from 0x8000-0x13FFF.
By default, VisSim allocates both stack and heap in the first 2K section to leave the 2nd section free for program variable use. Normally not much heap is used so this is not a problem. If you are using significant heap, which can happen if you are debugging and passing matrices to/from the PC and target, then you can move the heap from the first memory segment to the 2nd by editing the linker command file. Linker command files are located in \vissim80\cg\lib and named \<target>lnk.cmd. For the F28069 it is called F28069lnk.cmd
To make the change do the following:
Is that a solution (without using VisSim)? And how can I implement that for F28335?
Thank you
Jonas
Hello Mr. Charantimath,
I'm sorry that I haven't answered so far !!!
Your solution works fine !!!
My RAMM1 in PAGE 1 hasn't much memory size (see Memory Configuration below). Now I'm unsure which of the other memory sections I can use for adding to the heap area.
For example, can I use ZONE7D in PAGE 1 for heap, because this has got a big length and is unused???
Thanks a lot
Jonas Blau
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- --------- ----- ----
PAGE 0:
BEGINRAM 00000000 00000002 00000002 00000000 RWIX
RAMM0 00000002 000003fe 00000000 000003fe RWIX
RAML4L7 0000c000 00004000 00003dce 00000232 RWIX
ZONE7P 00200000 00010000 00000000 00010000 RWIX
FLASH 00300000 0003fff6 00000000 0003fff6 RWIX
BEGINFLASH 0033fff6 00000002 00000000 00000002 RWIX
ADC_CAL 00380080 00000009 00000007 00000002 RWIX
OTP 00380400 00000400 00000000 00000400 RWIX
CSM_PWL 003f7ff8 00000008 00000000 00000008 RWIX
IQTABLES 003fe000 00000b50 00000000 00000b50 RWIX
IQTABLES2 003feb50 0000008c 00000000 0000008c RWIX
FPUTABLES 003febdc 000006a0 00000000 000006a0 RWIX
ROM 003ff27c 00000d44 00000000 00000d44 RWIX
RESET 003fffc0 00000002 00000000 00000002 RWIX
VECTORS 003fffc2 0000003e 00000000 0000003e RWIX
PAGE 1:
RAMM1 00000400 00000400 00000279 00000187 RWIX
DEV_EMU 00000880 00000180 000000d0 000000b0 RWIX
FLASH_REGS 00000a80 00000060 00000008 00000058 RWIX
CSM 00000ae0 00000010 00000010 00000000 RWIX
ADC_MIRROR 00000b00 00000010 00000010 00000000 RWIX
XINTF 00000b20 00000020 0000001e 00000002 RWIX
CPU_TIMER0 00000c00 00000008 00000008 00000000 RWIX
CPU_TIMER1 00000c08 00000008 00000008 00000000 RWIX
CPU_TIMER2 00000c10 00000008 00000008 00000000 RWIX
PIE_CTRL 00000ce0 00000020 0000001a 00000006 RWIX
PIE_VECT 00000d00 00000100 00000100 00000000 RWIX
DMA 00001000 00000200 000000e0 00000120 RWIX
MCBSPA 00005000 00000040 00000025 0000001b RWIX
MCBSPB 00005040 00000040 00000025 0000001b RWIX
ECANA 00006000 00000040 00000034 0000000c RWIX
ECANA_LAM 00006040 00000040 00000040 00000000 RWIX
ECANA_MOTS 00006080 00000040 00000040 00000000 RWIX
ECANA_MOTO 000060c0 00000040 00000040 00000000 RWIX
ECANA_MBOX 00006100 00000100 00000100 00000000 RWIX
ECANB 00006200 00000040 00000034 0000000c RWIX
ECANB_LAM 00006240 00000040 00000040 00000000 RWIX
ECANB_MOTS 00006280 00000040 00000040 00000000 RWIX
ECANB_MOTO 000062c0 00000040 00000040 00000000 RWIX
ECANB_MBOX 00006300 00000100 00000100 00000000 RWIX
EPWM1 00006800 00000022 00000022 00000000 RWIX
EPWM2 00006840 00000022 00000022 00000000 RWIX
EPWM3 00006880 00000022 00000022 00000000 RWIX
EPWM4 000068c0 00000022 00000022 00000000 RWIX
EPWM5 00006900 00000022 00000022 00000000 RWIX
EPWM6 00006940 00000022 00000022 00000000 RWIX
ECAP1 00006a00 00000020 00000020 00000000 RWIX
ECAP2 00006a20 00000020 00000020 00000000 RWIX
ECAP3 00006a40 00000020 00000020 00000000 RWIX
ECAP4 00006a60 00000020 00000020 00000000 RWIX
ECAP5 00006a80 00000020 00000020 00000000 RWIX
ECAP6 00006aa0 00000020 00000020 00000000 RWIX
EQEP1 00006b00 00000040 00000040 00000000 RWIX
EQEP2 00006b40 00000040 00000040 00000000 RWIX
GPIOCTRL 00006f80 00000040 0000002e 00000012 RWIX
GPIODAT 00006fc0 00000020 00000020 00000000 RWIX
GPIOINT 00006fe0 00000020 0000000a 00000016 RWIX
SYSTEM 00007010 00000020 00000020 00000000 RWIX
SPIA 00007040 00000010 00000010 00000000 RWIX
SCIA 00007050 00000010 00000010 00000000 RWIX
XINTRUPT 00007070 00000010 00000010 00000000 RWIX
ADC 00007100 00000020 0000001e 00000002 RWIX
SCIB 00007750 00000010 00000010 00000000 RWIX
SCIC 00007770 00000010 00000010 00000000 RWIX
I2CA 00007900 00000040 00000022 0000001e RWIX
RAML0L3 00008000 00004000 00003dac 00000254 RWIX
ZONE7D 00210000 00010000 00000000 00010000 RWIX
CSM_PWL 0033fff8 00000008 00000008 00000000 RWIX
Hi Jonas
Nice to hear that the solutions works for you.
Regarding the ZONE7D, this section belongs to the external RAM. (look up for ZONE7D in the .cmd file. It is placed in the external_ram section)
So the answer is subjective. You can use this, only if you have external RAM interfaced to the c28335.
Thanks.
Amit Charantimath
Hello Amit,
I have overlooked that the ZONE7D is placed in the external_ram section!
But my question for more RAM is still remaining. How can I get more RAM (besides using external RAM) ??? Or is that not possible?
Best regards
Jonas Blau