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.

LAUNCHXL-F280039C: CLA code not working

Part Number: LAUNCHXL-F280039C
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello Experts,

I'm running CLA task on ADC EOC. after adding control loop code into task it is buildable but not working. For confirmation I added a variable for testing and implemented such a way that on every call of CLA task it increments. CLA task is simple as now.

when I run code variable is not incrementing even though added code is commented out. Memory allocation is OK it notifies that linking is done properly.

I'm attaching linker file and map file for your reference below.

TI_help.zip

  • Hi Mohit,

    Can you instead try adding a __mdebugstop() line into the CLA task and seeing if the CLA ever stops there? You can load the code in the following order to check if the task is being called:

    1. Launch target configuration
      1. both cores should be disconnected
    2. "Connect Target" for the c28x
      1. c28x will be suspended  
      2. It may throw an error about not having the debug information at this point, that can be ignored
    3. Load the .out file onto the c28x (Run >> Load >> Load Program >> [navigate to the .out file])
      1. c28x will be suspended still
    4. "Connect Target" for the CLA
      1. both cores will be suspended
    5. Load the .out symbols onto the CLA (Run >> Load >> Load symbols >> [navigate to the .out file])
    6. Switch context to the c28x (click on it in the debug window) and Resume
    7. Switch context back to the CLA and you should see it stop at the __mdebugstop();

    There is also an example in C20000ware where a CLA task is triggered by an ADC event (cla_ex5_adc_just_in_time), can you make sure your setup is similar?

    Best Regards,

    Delaney

  • Hello,

    Thanks for your reply.

    I tried to follow steps which you mentioned above. It is halting at __mdebugstop() but on removing it, CLA core is not working properly.

    I checked with example code, it is having same configuration as example for triggering.

    please suggest solution for this.

    Mohit M

  • Hi Mohit,

    It is halting at __mdebugstop() but on removing it, CLA core is not working properly.

    That means that the task is being triggered properly then. What exactly are you seeing not working? Is not incrementing the Mohit_test() variable you are referring to?

    Did you make any changes to the linker cmd file from one of the C2000ware provided linker cmd files? If so, what did you change and what was the purpose for changing? It is usually recommended not to change the linker if possible.

    Best Regards,

    Delaney

  • Hello,
    yes we changed linker file as memory for CLA was limited.
    We used linker file of one of the example project which has same application as us. linker file is attched below.

    CLA is taking 8.7kb size where upto 8kb code is working fine. is there any limitation? we are using type2 CLA.

    28003x_generic_flash_lnk.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    MEMORY
    {
    BEGIN : origin = 0x00080000, length = 0x00000002
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    RAMM0 : origin = 0x00000128, length = 0x000002D8
    RAMM1 : origin = 0x00000400, length = 0x000003F8
    // RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    RAMLS0LS1 : origin = 0x00008000, length = 0x00001000
    // RAMLS1 : origin = 0x00008800, length = 0x00000800
    RAMLS2LS3LS4LS5LS6 : origin = 0x00009000, length = 0x00002800
    // RAMLS3 : origin = 0x00009800, length = 0x00000800
    // RAMLS4 : origin = 0x0000A000, length = 0x00000800
    // RAMLS5 : origin = 0x0000A800, length = 0x00000800
    // RAMLS6 : origin = 0x0000B000, length = 0x00000800
    RAMLS7 : origin = 0x0000B800, length = 0x00000800
    RAMGS0GS1 : origin = 0x0000C000, length = 0x00002000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    - Mohit

  • Hi Mohit,

    I would suggest using one of the CLA linker cmd files as a starting point and making any needed modifications to that. All the provided F28003x linker cmd files are in the folder path [C2000ware path]/device_support/f28003x/common/cmd/. The linker cmd files with "cla" in the filename already allocate space for the CLA, so it would probably be best to start with the 28003x_cla_flash_lnk.cmd file and seeing if you can get your program working with that.

    The only limitation would be that the CLA program must fit in the LSRAM memory allocated for it. For the F28003x, LSRAMs 0-7 are all accessible by the CLA, but they don't necessarily all need to be used. I would try keeping the CLA program allocation just to LSRAM0 and only extending the program to use more LSRAMs if the program can't fit in that section of memory. If the program doesn't fit in the allocated LSRAM memory, it will throw an error when building.

    Best Regards,

    Delaney