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.

HRPWM with Sysbios

Other Parts Discussed in Thread: SYSBIOS, TMS320F28069

Hello,

I am running into problems, when trying to adapt PWM frequency with HRPWM within my Sysbios application. 

According to spruh18e.pdf (page 400) " Auto-conversion must be enabled when using TBPRDHR" , so I did. 

My program is intended to call SFO() to calibrate MEP_ScaleFactor.

When compiling I encounter 

W: #10247-D creating output section "Cla1Prog" without a SECTIONS specification 
W: #10247-D creating output section "CpuToCla1MsgRAM" without a SECTIONS specification 

E: #10099-D program will not fit into available memory. placement with alignment/blocking fails for section "codestart"

It seems as if SFO_TI_Build_V6b_FPU.lib makes use of CLA, but CLA is not configured in linker command file TMS320F28069.cmd.

Is there an example showing how to use HRPWM with auto conversion in SYSBIOS?

Is it feasible to use auto conversion without using SFO()

  • Hi Joerg,

    Joerg Moellendorf said:
    W: #10247-D creating output section "Cla1Prog" without a SECTIONS specification W: #10247-D creating output section "CpuToCla1MsgRAM" without a SECTIONS specification

    As far as the warnings go, if you add the following memory and  sections to the linker command file, they should go away:

    Under the MEMORY section, page 1 add

       CLA1_MSGRAMLOW       : origin = 0x001480, length = 0x000080
       CLA1_MSGRAMHIGH      : origin = 0x001500, length = 0x000080

    Under the SECTIONS, add

    Cla1Prog :  LOAD = FLASHH,
                RUN=RAML3,
                LOAD_START(_Cla1funcsLoadStart),
                LOAD_END(_Cla1funcsLoadEnd),
                LOAD_SIZE(_Cla1funcsLoadSize),
                RUN_START(_Cla1funcsRunStart),
                PAGE = 0
    
    Cla1ToCpuMsgRAM  : > CLA1_MSGRAMLOW,   PAGE = 1
    CpuToCla1MsgRAM  : > CLA1_MSGRAMHIGH,  PAGE = 1

    Since, Cla1Prog is now in FLASH at load time, you have to make sure to memcpy it to RAML3 at run time. In your main.c file, add the following lines of code:

    extern Uint32 Cla1ProgRunStart, Cla1ProgLoadStart, Cla1ProgLoadSize;
    
    // Copy over code from FLASH to RAM
    memcpy((Uint32 *)&Cla1ProgRunStart, (Uint32 *)&Cla1ProgLoadStart,(Uint32 )&Cla1ProgLoadSize);

    Now, i dont think SFO has anything to do with the CLA because the SFO lib is meant to work on the entire 2806x line and some of the derivatives do not have a CLA. It could possibly be that you have some CLA code in your project.

  • Hi Vishal,

    thank you for your fast response. Meanwhile I was able to solve the problem.

    Vishal_Coelho said:
    Now, i dont think SFO has anything to do with the CLA because the SFO lib is meant to work on the entire 2806x line and some of the derivatives do not have a CLA. It could possibly be that you have some CLA code in your project.

    SFO was not, as you rightly pointed out, the problem. I re-implemented my code from scratch until I encountered a compiler/linker error. Problem was an unused third-party library, which defined MEP_ScaleFactor. I still have no clue, if or how this, however, led to the given linker error in the first place.

    After removing the unused library my code compiled and linked fine.