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.

TMS320F28388D: Inquiry HRPWM Global Variables

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi Team,

In the C:\ti\c2000\C2000Ware_4_03_00_00\libraries\calibration\hrpwm\f2837xd\lib\readme.txt, is it specified that SFO() would use an array

volatile uint32_t ePWM[(PWM_CH + 1)] = {0, EPWM1_BASE, EPWM2_BASE};

and a status variable:

uint16_t status = SFO_INCOMPLETE;

This looks weird. Why are global variables defined? How can the `SFO` check the size of the array? Why status should be global as well?

Moreover, should I prefer 5 or 6? What is the difference between these two libraries?

5. SFO lib Driverlib implementation in EABI format  - SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib
6. Index lib for Driverlib based SFO lib            - SFO_v8_fpu_lib_build_c28_driverlib.lib

Apart from readme.txt, I don't find any documentation related to this SFO library.

What I would like to understand: 

 - Is this global `ePWM` variable required, is it possible to change its name, or better, send it to SFO(ePWM)?

- How long does SFO takes in average?

- How frequently should I call SFO? Is it reasonable to call it on every 40kHz PWM cycle?


Thanks in advance!


Kind Regards,

Jejomar

  • Hi Jejomar,

    Apologies for the delayed response, I will loop in our SFO expert to assist with this question. Please expect a response back within 24 hours.

    Thank you,

    Luke

  • Hi Jejomar,

    5. SFO lib Driverlib implementation in EABI format  - SFO_v8_fpu_lib_build_c28_driverlib_eabi.lib
    6. Index lib for Driverlib based SFO lib            - SFO_v8_fpu_lib_build_c28_driverlib.lib

    Number 6 is the index library for Driverlib which basically takes in the EABI format or the COFF format library as per the configurations done in the project properties. It is recommended to use 6, but incase user is specifically using only the EABI format, it's OK to go ahead and add 5 only in their project. It should give the same results.

    Apart from readme.txt, I don't find any documentation related to this SFO library.

    A brief documentation around the SFO library is provided in the device TRM as well. You can ask customer to go over the same as well for additional documentation.

    How long does SFO takes in average?

    There was actually a previous detailed discussion on the timings of the SFO library. You can check it here - TMS320F280049-Q1: SFO library takes too long time - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums

    I don't have an exact number as of now, but just to give an insight, the SFO should be running in the background loop which can be interrupted, This shouldn't cause any issue in the application execution., i.e. may be in the infinite loop added in the application.

    I would not recommend to call the SFO function inside an ISR considering the slowness of execution, better it be in a slower background loop.

    Thanks,
    Aditya