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.

TMS320F28335: PID Simulation Digital Control Library (DCL)

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Dear community member,

I am new to PID controller simulation. I checked the Digital Control Library (DCL). I want to simulate the simple PID block. I have some errors in building the file. Please suggest.

Steps which I followed as given below:

1- Firstly, I select "Example_F28069_PID.c" from the DCL libraries(C:\ti\c2000\C2000Ware_4_03_00_00\libraries\control\DCL\c28\examples\F28069_PID).

2- Then I uploaded in my CCS program and changed the header files from F2806x to DSPf2833x (lines 9-11) because I am using the f28335 device (Control card with evaluation board). Also you can see the included files in Project Explore sections. See the picture below.

3- When I build the Project, I had 18 errors in the console window.  See the attached error file & the problem window picture:

console_err.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**** Build of configuration Debug for project Example_2833xEPwmUpDownAQ ****
"C:\\ti\\ccs1220\\ccs\\utils\\bin\\gmake" -k all
Building file: "../Example_2833xEPwmUpDownAQ.c"
Invoking: C2000 Compiler
"C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2806x/headers/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2806x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include" --include_path="C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/headers/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/IQmath/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/FPUfastRTS/c28/include" --define=_DEBUG --define=LARGE_MODEL -g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet --preproc_with_compile --preproc_dependency="Example_2833xEPwmUpDownAQ.d_raw" "../Example_2833xEPwmUpDownAQ.c"
>> Compilation failure
subdir_rules.mk:79: recipe for target 'Example_2833xEPwmUpDownAQ.obj' failed
"C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include/DCLF32.h",
line 216: note: declaration may not appear after executable
statement in block
float32_t beta1 = -(float32_t) crealf(q->z1 + q->z2);
^
"C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include/DCLF32.h",
line 217: note: declaration may not appear after executable
statement in block
float32_t beta0 = (float32_t) crealf(q->z1 * q->z2);
^
"C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include/DCLF32.h",
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

4- The code is attached here:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Example_F28069_PID.c
*
* Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
* ALL RIGHTS RESERVED
*
*/
// header files
#include "DSP2833x_Device.h"
#include "DSP2833x_Examples.h"
#include "DSP2833x_GlobalPrototypes.h"
#include "DCLF32.h"
// function prototypes
extern interrupt void control_Isr(void);
// global variables
long IdleLoopCount = 0;
long IsrCount = 0;
float rk = 0.25f;
float yk;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Community members, please suggest to resolve the issue.

Regards

Arsalan

  • I suggest first removing the include folders I've marked in the picture below. They are not valid for your new device and I'm guessing is causing many compile and link problems:

  • Hi Kier,

    Thanks for your reply. Still having same errors after removing those marked include files. See attached picture.

    Please suggest.

    Thanks

    Regards

    Arsalan

  • It seems the code from F28069 is not compatible with the register definitions of F28335. Maybe they don't have the same ADC silicon and so on.

    Perhaps a better starting point is to find a working ADC example for your class of device (Example_2833xAdcSoc) then cut and paste the PID control code and add in the DCL library etc.

  • Hi Arsalan,

    I tried to replicate the issue and I can confirm with Kier that there're naming difference in terms of ADC setup between F28335 and F28069. To name a few, ADCINT1 named in F28069 is just named ADCINT in F28335. Therefore I suggest going through each of the ADC definition files (DSP2833x_Adc.h and F2807x_Adc.h) to pinpoint the difference in naming convention. The example you used (2833xEPwmUpDownAQ) is also missing the DSP2833_Adc.c file so perhaps like what Kier suggests, ADC examples might be a better starting point to conduct the porting activity.

    The statement "note: declaration may not appear after executable statement in block" is just a warning that seemingly trying to follow a C90 standard which forbids mixing declaration and code. Regardless it compiles just fine after getting rid of the other error statements. I've contacted our internal expert regarding this and will get back to you once I received an update.

    Best,

    Sen Wang

  • Hi Kier & Sen Wang,

    Before including PID setup in ADC, I just import the Example_2833xAdcSoc and then build the Project. I found some errors. I will include the PID code later in this example. Please help to resolve this errors in Example_2833xAdcSoc.

    the code is here:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    Please suggest accordingly.

    Thanks

    Arsalan

     

  • I get the archive warning but not the errors in the Problems window. It's strange because you generate an output file regardless of the error. You may be able to debug the .out file anyway.

    Do any of the examples compile without error?

    This looks like a problem for TI to tackle. Sorry I can't be more helpful.

  • Hi

    Thanks Kier, Yes I simulated my EPWM program before using EPWMupdownAq example which gives only warning but no errors. and it worked as well on the board which i tested before.

    Any TI members can help or suggest me to resolve this error in the problem window.

    Other TI members and experts .... 

    Three lines which build errors in the code:

    IER = 0x0000;
    IFR = 0x0000;

    IER |= M_INT1;      // Enable CPU Interrupt 1

    The code is here:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards

    Arsalan

  • Hi Arsalan,

    Oddly enough when I tried to replicate your problem I couldn't obtain the error. Both IER and IFR are a definition in DSP2833x_Device.h, which should be under your Includes -> C2000WareRepo/device_support/f2833x/headers/include, please double check to see if this file exists and build it again. Your console output seems to built it just fine. 

    Speaking of the "warning: cannot resolve archive" , while it isn't necessary, one way to fix it is by changing the library name from "rts2800_fpu32_fast_supplement.lib" to "rts2800_fpu32_fast_supplement_coff.lib" for the COFF version. The following window can be found under Project Properties>Build>C2000 Linker> File Search Path

  • HI Seng & Kier,

    Thanks for your replies. The problem has been resolved now. There might be bug in CCS. I deleted the workspace, then again import the files and then this Example_2833xAdcSoc is working with no errors.

    Now I am going to check first on Hardware the same program and then i will add PID code as Kier said in previous post.

    Thanks

    Regards

    Arsalan 

  • Hi Seng & Kier,

    I have just checked on the hardware. The Example_2833xAdcSoc is running on the board. Changing analog values from 0-3V at AN02 & AN03 give change in Voltage1[10 bit] and Voltage2[10 bit] in terms Digital value. See picture below

      

    Now I am going to add PID code from F28069_PID example into this code (F28335 ADC_SOC) as Kier said in previous post. I will get back soon for PID simulation.

    Thanks

    Regards

    Arsalan 

  • Hi Seng & Kier,

    I have just checked on the hardware. The Example_2833xAdcSoc is running on the board. Changing analog values from 0-3V at AN02 & AN03 give change in Voltage1[10 bit] and Voltage2[10 bit] in terms Digital value. See picture below

      

    Now I am going to add PID code from F28069_PID example into this code (F28335 ADC_SOC) as Kier said in previous post. I will get back soon for PID simulation.

    Thanks

    Regards

  • Hi Kier & Sen & TI Community,

    As I explained you before that I am working on F28335 card and I have only F28069 code example for PID simulation. As per your suggestion, I ran the Example_2833xAdcSoc first on Hardware which is working fine. Now I copied the PID part of the code(from F28069) in this example. But I have several errors to resolve. Please suggest this to resolve the errors accordingly.

    The combine code is attached here:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Console window file having errors:>

    console_err1.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    **** Build of configuration Debug for project Example_2833xAdcSoc ****
    "C:\\ti\\ccs1220\\ccs\\utils\\bin\\gmake" -k all
    Building file: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_ADC_cal.asm"
    Invoking: C2000 Compiler
    "C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/headers/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/IQmath/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/FPUfastRTS/c28/include" --define="_DEBUG" --define="LARGE_MODEL" -g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet --preproc_with_compile --preproc_dependency="DSP2833x_ADC_cal.d_raw" "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_ADC_cal.asm"
    Finished building: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_ADC_cal.asm"
    Building file: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_Adc.c"
    Invoking: C2000 Compiler
    "C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/headers/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/IQmath/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/FPUfastRTS/c28/include" --define="_DEBUG" --define="LARGE_MODEL" -g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet --preproc_with_compile --preproc_dependency="DSP2833x_Adc.d_raw" "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_Adc.c"
    Finished building: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_Adc.c"
    Building file: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_CodeStartBranch.asm"
    Invoking: C2000 Compiler
    "C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/bin/cl2000" -v28 -ml -mt --float_support=fpu32 --include_path="C:/ti/ccs1220/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/control/DCL/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/headers/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/IQmath/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/libraries/math/FPUfastRTS/c28/include" --define="_DEBUG" --define="LARGE_MODEL" -g --diag_suppress=10063 --diag_warning=225 --issue_remarks --verbose_diagnostics --quiet --preproc_with_compile --preproc_dependency="DSP2833x_CodeStartBranch.d_raw" "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_CodeStartBranch.asm"
    Finished building: "C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f2833x/common/source/DSP2833x_CodeStartBranch.asm"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Problem Window screenshot :>

    Thanks

    Regards

    Arsalan

  • I think this time the problem is nothing to do with the microcontroller or compiler or DCL library. This is more to do with your understanding regarding the structure of a 'C' program.

    You can only assign a value to a variable when a) you declare it OR b) inside a function.

    The problem lines, starting line 248, do not meet either of these rules.

  • Hi Kier,

    Thanks for your reply.

    I just moved the variables (pid.Kp, .pid.Ki, ...) in global variable section and defined the variables as float. Still having declaration errors.

    Please suggest

    Regards

    Arsalan

  • Please suggest

    I suggest you review some aspects of 'C' programming . Maybe start here:

    https://www.cprogramming.com/tutorial/c/lesson7.html

  • Hi Kier, 

    Thanks for sharing this link: https://www.cprogramming.com/tutorial/c/lesson7.html. It's quite useful in understanding.

    I see in DCL32.h file. which has already explained structure members using declaration in float32_t format like this (float32_t Kp,float32_t Ki .....)  in Picture 1:The DCL32.h is included in the code as well.  Do i need to add this float32_t pid1 in DCL.h file? I have tried this part as well.

    The struct name is called upon through DCL_PID. Then this structure DCL_PID has a variable name: pid1 --->(DCL_PID pid1). In order to access the members of structure, we write this in the code like ---> (pid1.Kp= 9.0f; ,  pid1. Ki = 0.015f; .....) But it still has same errors in this section.  See Picture 2

    Picture 1:

      

    Picture 2

    Declaration format in DCL User guide:

    The code is attached here:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please suggest to resolve this error in the structure format.

    Thanks & Regards

    Arsalan

  • Hi Arsalan, 

    This again loops back to what Kier was saying about C programming style. You're trying to redefine a variable outside of a function which is strictly prohibited. Since C does not guarantee the order of files that get compiled and linked, it would create unexpected behaviors if variable redefinitions are allowed outside of the function.

    You can only assign values to a variables either during declaration of a global variable, or inside of a function. In this case I believe you meant to put the controller variables(line 254-265) inside of the main function, before you enable the interrupt.

    Due to limited bandwidth, I sadly cannot go over C fundamentals as it's expected to be at your own paste. But I'm still happy to help any DCL-related questions if you have further inquiries.

    Best,

    Sen

  • Hi Sen & Kier,

    Thanks for your reply. I am attaching updated code again. As Sen said that I am defining a variables just after the Global variables. Now the errors have been reduced from 26 to 3. 

    The only problem is pid1 (variable) (undefined). As kier shared about the struct method, I tried to define pid1 in struct routine like:

    (typedef struct dcl_pid pid1;) in main function or outside main function but it doesn't work.

    Can you please suggest to define pid1 in struct format? 

    The code is shared as

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks

    Kind Regards

    Arsalan

  • Hi Arsalan,

    The problem is that you've declared the variable "pid1" within the main() func that only has local scope and see its existence within the main() func. You can declare the variable in global to solve this problem. 

    Best,

    Sen

  • Hi Sen,

    Thanks for your reply

    This time:  float pid11; or float32_t pid1; under the global variables but having still errors. 

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please suggest

    Thanks

    Regards

    Arsalan

  • Hi Arsalan,

    The first two undefined symbols are assembly functions located in the "source" folder of DCL, feel free to copy and paste the corresponding .asm files directly onto your project directory and it should work. For more reference, please refer to the user manual of DCL that also explains DCL project dependency found in docs/ folder of DCL directory.

    As to the third __InitEPwm, this is the EPwm module for F2806x, you need to change it to the EPWM functions of your new device.

    Best,

    Sen Wang

  • Hi Sen,

    Thanks for your reply. All your suggestions are quite helpfulRelieved

    Now all the errors have been removed except 1 warnings. Will it make any problem if we ignore these warnings?

    I am going to test this on hardware. I also have added the GPIO function in the code to enable EPWM & also have separated the EPWM configure lines in different function.

    Please check the warnings in below picture & review the code once again:

    Picture

    Code

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //###########################################################################
    //
    // FILE: Example_2833xAdcSoc.c
    //
    // TITLE: ADC Start of Conversion Example
    //
    //! \addtogroup f2833x_example_list
    //! <h1> ADC Start of Conversion (adc_soc)</h1>
    //!
    //! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
    //! Two channels are converted, ADCINA3 and ADCINA2.
    //!
    //! \b Watch \b Variables \n
    //! - Voltage1[10] - Last 10 ADCRESULT0 values
    //! - Voltage2[10] - Last 10 ADCRESULT1 values
    //! - ConversionCount - Current result number 0-9
    //! - LoopCount - Idle loop counter
    //
    //###########################################################################
    // $TI Release: $
    // $Release Date: $
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks

    Kind Regards

    Arsalan

  • Hi Arsalan,

    This warning should be fine, DCL lib has set some #pragmas CODE_SECTIONS("xxx",dclfuncs) in an attempt to group all dcl funcs into one memory spaces, the same would also be recommended for any datasets you're feeding into the library. This would ease up the debugging effort by making sure all dcl-related sections are in one contiguous space. However it would not work if the pre-destined memory sections is not pre-defined. If you really wanted to fix this problem, please edit your projects .cmd linker file to include:

    Fullscreen
    1
    2
    3
    /* Digital Controller Library functions */
    dclfuncs : > RAML4L, PAGE = 0
    dcl32funcs : > RAML4L, PAGE = 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    There're some examples of DCL .cmd files that has this modification under the cmd/ folder that you can take a look to pinpoint where exactly would you place these line of snippets.

    But like I said, the warning is not detrimental to running the program, it should still work and I'm glad that I answered your concern. 

    Since I answered all the question pertaining to the topic of this post, this post will be marked close, if you have further questions please open up an new forum post and we're happy to assist you once again.

    Best,

    Sen Wang