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.

TMS320F280039C: Code stuck at first line of CLA task

Part Number: TMS320F280039C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hello experts,

I configured 2 CLA tasks through sysconfig and 1 is for real time use and other is for one time initialization.

upon running code in debug code gets stuck at first line of task. (I'm following all starting process like connect target -> load symbols).

also I'm initializing ram for CPUtoCLA and CLAtoCPU. task8 is triggered by SW.

code is getting stuck as per below image

plz suggest solution for this...

Regards,
Mohit   :)

  • Hello,

    Check the CLA disassembly window - does it look like reasonable code or is it all 0?

    Did the CPU initialize the CLA memory and then give the memory ownership to the CLA?

    How is the task started?

    You find the CLA development guide helpful 

    -Lori

  • Hi there,

    Check the CLA disassembly window - does it look like reasonable code or is it all 0?

    Yes, it is all 0s. what could be reason?

    How is the task started?

    Task 8 is started by SW trigger .

    Did the CPU initialize the CLA memory and then give the memory ownership to the CLA?

    How can I check this?

    - MOHIT M

  • Yes, it is all 0s. what could be reason?

    The memory isn't assigned to the CLA and/or it hasn't been initialized. 

    Our C2000Ware CLA examples can be used as reference. 

  • Hello,
    I referred through example code and didn't find anything fruitful. 

    I already configured CLA and MEMCFG same as example.

    upon connecting CLA and loading symbols, in disassembly view everything are still 0s.

  • Hello Mohit, 

    Apologies for not getting back to you earlier. I wanted to check if this still an issue at your end?

    Best regards,

    Lori

  • yes Lori,

    We are still dealing with isuue.
    Please share solution

    Mohit :) 

  • Hi Mohit - can you share a small project that shows the issue? 

  • Also - Which version of CCS? If not the latest, can you try the latest - 12.5?

  • Mohit,

    I tried running cla_ex4_pwm_control from C2000Ware V5.01 on CCS 12.4. 

    Task 8 it started by the CPU and runs fine. I also see Task 1 run fine. 

    The main function makes a call to Board_init() found in the generated board.c file. Board_init() calls CLA_init and MEMCFG_init.

    Once the mem configuration is done, if I go to the CLA CPU (click on CLA in the Debug window) and open up the disassembly to Cla1Task1 the memory is there and it is initialized to CLA code.

    Does this example work for you? 

  • Which version of CCS? If not the latest, can you try the latest - 12.5?

    I'm using CCS 12.4. Is it really matters for this issue to change version?

    I tried running cla_ex4_pwm_control from C2000Ware V5.01 on CCS 12.4.

    I also tried with cla example and it is working fine but when I'm configuring and integrating CLA into our project, it is giving problems. May be memory is not initialized properly even though I'm using standard method steps for CLA.

    Below are some snippets from our configuration:

    sysconfig:

    CLA: Till now we configured both task to be triggered via SW only.

    MEMCFG: 

    as per Sysconfig configuration code is generated properly.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    void PFC_MCAL_CLA_init(){
    //
    // Configure all CLA task vectors
    // On Type-1 and Type-2 CLAs the MVECT registers accept full 16-bit task addresses as
    // opposed to offsets used on older Type-0 CLAs
    //
    #pragma diag_suppress=770
    //
    // CLA Task 1
    //
    CLA_mapTaskVector(PFC_MCAL_CLA_BASE, CLA_MVECT_1, (uint16_t)&PFC_CLA_TASK1);
    CLA_setTriggerSource(CLA_TASK_1, CLA_TRIGGER_SOFTWARE);
    //
    // CLA Task 8
    //
    CLA_mapTaskVector(PFC_MCAL_CLA_BASE, CLA_MVECT_8, (uint16_t)&PFC_CLA_TASK8);
    CLA_setTriggerSource(CLA_TASK_8, CLA_TRIGGER_SOFTWARE);
    //
    // Disable background task
    //
    CLA_disableBackgroundTask(PFC_MCAL_CLA_BASE);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I triggered both task as per our requirement by following calling API.

    CLA_forceTasks(CLA_BASE, PFC_CLA_TASKno);

    ISSUE:

    > code getting stuck at first line of Task8 (like hit of breakpoint)
    > In disaasembly view, data is not visible properly.all data are 0s.

    We can have a short call if possible to solve this issue.

    Regards,

    Mohit

  • Mohit - there doesn't seem to be memory configured as CLA program memory in your sysconfig screen capture.

  • Thank you Lori,

    I got solution.

    By mistake, CPU memory was initialized instead of CLA.

    Mohit Slight smile