TIDM-02010: Issue with SFRA Configuration on F2800137 using MotorControl SDK

Part Number: TIDM-02010
Other Parts Discussed in Thread: SFRA, C2000WARE

Tool/software:

Hi Experts,

I am working on a proof of concept (PoC) using the C2000Ware_MotorControl_SDK_5_03_00_00 with the F2800137 microcontroller. Currently, I am attempting to enable SFRA (Software Frequency Response Analyzer) for tuning purposes. I followed the configuration steps provided in this link: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1274712/tidm-02010-error-and-warnings-after-enabling-sfra?tisearch=e2e-sitesearch&keymatch=SFRA%20dmpfc#

Once I clicked on connect button on SFRA GUI, we received Interrupt_illegalOperationHandler for line "(*SFRA_GUI_cmdDispatcher[SFRA_GUI_cmdPacket[0]])();" of function SFRA_GUI_cmdInterpreter, below are the call stack

Value of SFRA_GUI_cmdDispatcher is below

and value of SFRA_GUI_cmdPacket is below:

Observations:


SFRA_GUI_cmdDispatcher: It is an array with 16 elements.
SFRA_GUI_cmdPacket[0]: Its value is 240, which attempts to access the 240th index of SFRA_GUI_cmdDispatcher. Since the array has only 16 elements, this results in an out-of-bounds access causing the exception.

 

Please help me to solve this issue, and also let me know in case of further details are required.

  • Hi Team,

    Any update on this?

    Additional Information: we are using "C2000Ware_DigitalPower_SDK_5_03_00_00" (...\C2000Ware_DigitalPower_SDK_5_03_00_00\libraries\sfra\gui) for SFRA GUI.

  • Ankit,

    May I know, Without using SFRA GUI and enabling SFRA is it working? Are you able to see magnitude and Phase arrays getting filled?

    Thanks,

    Shashank

  • Hi Shashank,

    I identified the issue and made the following changes to address it:

    1. For the F2800137 MCU, the DEVICE_LSPCLK_FREQ should be 120MHz/4 = 30MHz. Therefore, I updated the value of SFRA_GUI_VBUS_CLK from 50000000 to 30000000 in the file sfra_settings.h.

    2. Corrected a typo in the file sfra_f32.h at line 38: changed _TI_EABI_ to __TI_EABI__.

    After applying these changes, the SFRA GUI is now showing as connected. Could you please validate these modifications?

    Additionally, when I start a sweep with the start frequency set to 1000 kHz, I noticed that the generated CSV file (attached) begins at 20 Hz and goes up to 1887013.375 Hz. However, based on the provided settings, it should sweep from 1 kHz to 25.12 kHz. Am I missing something?

     SFRAData12_December_2024_10_56_00.csv

    Looking forward to your insights.

  • Ankit,

    Can you provide configured input arguments for "SFRA_F32_config" and "SFRA_GUI_config"? Additionally, can you mention at what frequency "SFRA_F32_runBackgroundTask", "SFRA_GUI_runSerialHostComms" getting called at?

    Please share generated CSV, for better debugging purpose to recreate the issue!

    In SFRA GUI, please select floating point instead of fixed point.

    Thanks,

    Shashank