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.

CLA to CPU Message Ram (CPU read)

Other Parts Discussed in Thread: TMS320F28035

I have problems reading data in the CPU from the CLA to CPU Message Ram (0x001480), TMS320F28035 MCU.

I use the C-compiler for the CLA.

My register initialization for the CLA is similar to the one in "iir2p2z" from "F2806x_examlpes_cla" folder. I have followed the wiki page for the CLA C Compiler setup.

I have 1 CLA task running in a loop, doing some computation. In the CLA task some data is written to the 0x001480 CLA to CPU Message Ram. When I try to read this data in the CPU, the debugger crashes returning 2989 on all the registers.

Does the CLA need to be halted to be able to access this data? (reference to the TMS320x2803x CLA Reference Guide - A.1.2 CLA Program Memory p.152.) ? Or are the other reasons for this? Perhaps some debug issues?

Thanks in advance,

Pavel

  • Pavel,

    I assume you are writing to some variable in the cla to cpu message ram??. Are you reading this variable on the C28 side?

    I think the examples have optimization turned on-- if you are not reading this variable on the c28 side it might have been optimized out.

    Its odd that the debugger crashes on a debug read. I haven't come across this behavior before. Do the examples work correctly on the 28035 on your machine?

  • Hello Vishal,

    Yes the problem was reading the variable on the C28 side from the cla to cpu message ram.

    I have temporary solved this problem, by changing some things in in the linker .cmd file.

    When i had this problem, i was loading the Cla1Prog into FLASH and running from the RAML3 (0x009000). I changed to both loading and running from the RAML3 and the cla to cpu message ram write/read started to work properly.

    Though i still want to load the Cla1Prog into FLASH  and have both c28 and cla working properly. There might be some conflict of c28 and cla been programmed into the same FLASH? I have uploaded my linker file, perhaps there are some errors in the setup.

    0184.F28035_CLA_C28.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    --undef_sym=__cla_scratchpad_end
    --undef_sym=__cla_scratchpad_start
    _Cla1Prog_Start = _Cla1funcsRunStart;
    MEMORY
    {
    PAGE 0: /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    RAML0 : origin = 0x008000, length = 0x000800 /* on-chip RAM block L0 */
    RAML3 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L3 */
    OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
    FLASHH : origin = 0x3E8000, length = 0x002000 /* on-chip FLASH */
    FLASHG : origin = 0x3EA000, length = 0x002000 /* on-chip FLASH */
    FLASHF : origin = 0x3EC000, length = 0x002000 /* on-chip FLASH */
    FLASHE : origin = 0x3EE000, length = 0x002000 /* on-chip FLASH */
    FLASHD : origin = 0x3F0000, length = 0x002000 /* on-chip FLASH */
    FLASHC : origin = 0x3F2000, length = 0x002000 /* on-chip FLASH */
    FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    In the linker file i do no load anything to the ramfuncs.

    Best Regards,

    Pavel

  • Hi Pavel,

    If you are loading the Cla1Prog section into Flash you will need to memcpy it over to RamL3 on startup to get it to work.. take a look at the ClaAdcFirFlash example in the regular examples folder. You can use the same setup in that example

    The linker will give an error if you have mapped two sections to the same memory

  • Problem solved, thank you for your answer.