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.

Delfino F28377, Extending CLA program memory configuration

Hi,

I am using Delfino F28377 for my Motor control. I am trying to implement current control in CLA. I am getting CLA program memory is insufficient. Presently I configured LS5 as program RAM, and as per manual, i can assign any LSx memory block as program. Is it possible to use both LS4 and LS5 for program. If so, how to write in the *.cmd file. can I just write 

Cla1Prog         : > RAMLS5 | RAMLS4, PAGE=0

 and write necessary value in the register.

MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;

MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;

Also I want to know can I use GS0 block for .ebss. As present block LS2 for .ebss is not sufficient for my code.

Thanks & Regards,

Rathinavel

  • Hi,

    rathinavel j said:

    If so, how to write in the *.cmd file. can I just write 

    Cla1Prog         : > RAMLS5 | RAMLS4, PAGE=0

    Use Cla1Prog :>> RAMSLS5 | RAMLS4, PAGE=0 //  (>> instead of >)

    rathinavel j said:
    Also I want to know can I use GS0 block for .ebss. As present block LS2 for .ebss is not sufficient for my code.

     

    Yes you should be able to do this as well.

  • Thank you so much. It is working

  • Hi Vishal,

    if my code:

    /* CLA specific sections */
    Cla1Prog : LOAD = FLASHD,
    RUN = RAMLS4|RAMLS5,
    LOAD_START(_Cla1funcsLoadStart),
    LOAD_END(_Cla1funcsLoadEnd),
    RUN_START(_Cla1funcsRunStart),
    LOAD_SIZE(_Cla1funcsLoadSize),
    PAGE = 0

    How can I correct the same problem?
  • For this, you will need to change the memory definition, that is, combine RAMLS4 and 5, as follows:

    MEMORY
    {
    PAGE 0 :
     ...
       RAMLS45         : origin = 0x00A000, length = 0x001000
     ...
    PAGE 1 :
     ...
    }
     
    SECTIONS
    {
     ...
       Cla1Prog         :  LOAD = FLASHD,
                           RUN = RAMLS45,
                           RUN_START(_Cla1funcsRunStart),
                           LOAD_START(_Cla1funcsLoadStart),
                           LOAD_SIZE(_Cla1funcsLoadSize),
                           PAGE = 0
     ...
    }
    

  • Thanks you very much for your answer. ^^
  • Hi ,

    Could you help me expand the size of section "Cla1Prog"? I want to use FLASHB and FLASHC for this section (with F28035).

    I used FLASHB as the followings:

    PAGE 0:

    .............

    FLASHB      : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */

    ..............

    SECTIONS
    {

    .........

    Cla1Prog : LOAD = FLASHB, 
    RUN = RAML3,
    LOAD_START(_Cla1funcsLoadStart),
    LOAD_END(_Cla1funcsLoadEnd),
    RUN_START(_Cla1funcsRunStart),
    PAGE = 0

    ..........

    }

    the error:

    error #10099-D: program will not
    fit into available memory. run placement with alignment/blocking fails for
    section "Cla1Prog" size 0x1038 page 0. Available memory ranges:
    RAML3 size: 0x1000 unused: 0x1000 max hole: 0x1000
    Cla1Prog : LOAD = FLASHB,

    But I don't know why "Memory Allocation" window shows that FLASHB just occupied 50% but CLA1PROG section is full?


    Thank you so much!

  • Ok so RAML3 is defined 0x1000 wide and your program is 0x1038. You could combine rams in the memory defintions

    RAMLS2_4 : ORIGIN = 0x9000, size = 0x1800

    and then set the RUN memory for Cla1Prog to RAMLS2_4. IF you do this be sure to configure RAMLS2, 3 and 4 as CLA program memories in the CLA setup code