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.

Compiler/TMS320F28035: digital_power library bug for Two Pole Two Zero Controller

Part Number: TMS320F28035
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE-DIGITALPOWER-SDK

Tool/software: TI C/C++ Compiler

Hi TI,

I've been developing some code using the digital_power AMS macros and I think i've come across an issue with the macro when compared with the data structure definitions in the header files.

So, path information to help locating the files; the header is located in:

"..ti\controlSUITE\libs\app_libs\digital_power\f2803x_v3.5\include" and is DPlib.h.

It defines a data structure for the coefficients of the CNTL_2P2Z: 2-pole 2-zero library. The struct definition defines 8 elements, but when compared to the assembler code it appears to only access 7.

Assembler macro can be located at this path:

"..ti\controlSUITE\libs\app_libs\digital_power\f2803x_v3.5\asm_macros" and is CNTL_2P2Z.asm

1641.CNTL_2P2Z.asmDPlib.h

Please find attached the files in question for reference.

Due to the location of the new variable added in the header file, the assembler macro accesses when then turns out to be an uninitialised variable, resulting in some rather strange behaviour of the controller. This appear to have occurred between the transition from v3.3 of the library to v3.5.

Not sure how well this bug is documented, but if v3.5 of the library is not yet proven would you be able to suggest a stable version among those provided?

Cheers,

Alex Smith.

  • Alex,

    If you see the assembly code, it is accessing all 8 locations

    coeff is pointed to by XAR3, see accessed in line 80, 82, 84, 86, 88, 93, 94 and 102.

    We have used v3.5 modules in our system solutions.

    Please make sure you don't have a duplicate path to the old lib location, which may cause issues as two parts of the code may see different header file.

    Also, can you elaborate on the weirdness observed?

    I don't see any unexpected instruction, given the scope of change from v3.3 to v3.5

    .

  • I do need to let you know the digital power assembly library is in a not maintained state, i.e. we will not fix bugs etc. I am the author of that module and can help you resolve the issue on the forum but we will not do a formal release of the library as we have moved to our new collateral that is c2000ware-digitalpower-sdk and are using the DCL for the compensators.
  • Hi Manish,

    thanks for your prompt reply. You are correct that the newer version of the assembler macro does use the new variable, however i was thrown by the comment at the top of the macro file:

    I think the issue may have been that I was working off of some example code using an earlier version, and missed the changes going to the new one.

    I think I've resolved the issue for now; I just need to correctly initialise all entries of the structure prior to use of the controller.

    Cheers,

    Alex Smith.

  • Ok, I am glad the issue is resolved. sorry for the confusion because of the incorrect comment.

    -Manish