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.

Digital Power Library for F2803x

Other Parts Discussed in Thread: CONTROLSUITE

Hi Everybody,

I would like to realize a project with a buck boost power supply. Therefore I would like to use the TI DP library within ControlSuite.

- I am using the DPLibTemplate-F2803x as the starting point for my development.

- After importing this project into CCSv4 the build process was successful.

- In the next step I tried to add the PWMDRV_BuckBoost module as it is described in the DPLib.pdf. I included the correct new search paths for the include and asm folders, because of the new version f2803x_v3.2, where the PWMDRV_BuckBoost module is in. The original template is using f2803x_v3.0.

- I changed the search paths before modifying the template to make use of the PWMDRV_BuckBoost module to make sure that the original template works with the new version f2803x_v3.2. This build was successful too.

- If I now insert the necessary code into the template to use the PWMDRV_BuckBoost module I get the following erros, which reside in the ProjectName_DPL-ISR.asm or PWMDRV_BuckBoost.asm respectively.

Console Output:

"../ProjectName-DPL-ISR.asm", ERROR! at line 78: [E0009] Missing struct/union member or tag

MOVW DP,#_EPwm:m:Regs.CMPA

 

"../ProjectName-DPL-ISR.asm", REMARK at line 78: [R0001] After symbol substitution the line became:

MOVW DP,#_EPwmRegs.CMPA

 

"../ProjectName-DPL-ISR.asm", ERROR! at line 78: [E0009] Missing struct/union member or tag

MOV @_EPwm:m:Regs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", REMARK at line 78: [R0001] After symbol substitution the line became:

MOV @_EPwmRegs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", ERROR! at line 78: [E0003] Syntax error - Operand 2

MOV @_EPwm:m:Regs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", REMARK at line 78: [R0001] After symbol substitution the line became:

MOV @_EPwmRegs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", ERROR! at line 78: [E0004] Not expecting AX operand

MOV @_EPwm:m:Regs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", REMARK at line 78: [R0001] After symbol substitution the line became:

MOV @_EPwmRegs.CMPA.half.CMPA,AL

 

"../ProjectName-DPL-ISR.asm", ERROR! at EOF: [E0300] The following symbols are undefined:

CMPA

_EPwmRegs

 

Errors in Source - Assembler Aborted

I would very appreciate any kind of tips in order to get rid of these errors. I am not very familiar with programming in assembly, so I can not really think of the reasons for these errors.

Thank you and best regards,

Gregor

  • Hi Gregor,

    How did you initialize your PWM_BuckBoost Driver? Do you have the a line like

    PWMDRV_BuckBoost   1

    anywhere? This would be used to initialize the asm macro module. The "1" is used to define the EPwm module that you would configure for your BuckBoost.
    In the error output you can clearly see what is missing

    GINNI said:

     

    "../ProjectName-DPL-ISR.asm", REMARK at line 78: [R0001] After symbol substitution the line became:

    MOVW DP,#_EPwmRegs.CMPA

    "../ProjectName-DPL-ISR.asm", ERROR! at line 78: [E0009] Missing struct/union member or tag

    MOVW DP,#_EPwm:m:Regs.CMPA

    instead of EPwm1Regs.CMPA (just as an example) you only have EPwmRegs.CMPA

    Hope this was clear enough...

    Best regards

    Andreas

     

  • ·         Hi Andreas,

    thanks for your reply. You pushed me in the right direction. Yes I had  the initialization line within the ProjectName-DPL-ISR.asm file. The problem is that the PWMDRV_BuckBoost module initializes 2 PWMs. So instead of inserting:

    "PWMDRV_BuckBoost   1"         I had to insert       "PWMDRV_BuckBoost 1,2"    (n=1, m=2) and instead of

    "PWMDRV_BuckBoost_INIT 1"   I had to insert       "PWMDRV_BuckBoost_INIT 1,2"

    That was not so clear to me, because I thought the second PWM would be initialized automatically since the DPLib.pdf says that:

    void PWM_BuckBoost_CNF(int16 n, int16 m, int16 period)

    where "n" is the PWM Peripheral number which is configured in up count mode

                 "m" is (n+1) always and      <--------- thats why I thought it is set automatically

             "period" is the maximum value of the PWM counter

     

    Maybe Step8 and Step9 under PWMDRV_BuckBoost of DPLib.pdf should be corrected if my approach is right. But never the less thank you very much for your help!

    Regards,

    Gregor