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.

TMS320F28035: SFRA bad library or bad include?

Part Number: TMS320F28035
Other Parts Discussed in Thread: SFRA, C2000WARE,

Tool/software:

Hi,

I am following a tutorial from SFRA fixed-point step by step, why do I have the incompatibility error (Description Resource Path Location Type
declaration is incompatible with "SFRA_IQ SFRA1" (declared at line 68) ) when I get to the line below?

//SFRA Object Initialization //Specify the injection amplitude
SFRA1.amplitude=_IQ26(0.01);

the header file of SFRA_IQ_INCLUDE.h defines amplitude as int32_t?

// FILE: SFRA_IQ_Include.h
//
// TITLE: Prototypes and Definitions for the C28x FPU IQ Library
//
// AUTHOR: Manish Bhardwaj (C2000 Systems Solutions, Houston , TX)
//
// DATE: August 11, 2014
//
//###########################################################################
#ifndef SFRA_IQ_INCLUDE_H
#define SFRA_IQ_INCLUDE_H


#define MATH_TYPE 0 //IQ_MATH

#include "IQmathlib.h"
#include <stdint.h>

typedef struct{
int32_t *H_MagVect; //Plant Mag SFRA Vector
int32_t *H_PhaseVect; //Plant Phase SFRA Vector
int32_t *GH_MagVect; //Open Loop Mag SFRA Vector
int32_t *GH_PhaseVect; //Open Loop Phase SFRA Vector
float *FreqVect; //Frequency Vector
int32_t amplitude; //Injection Amplitude

...

Should I go ahead and change the header file? 

  • Hi,

    We have latest SFRA support with float point with example at location(C2000Ware_DigitalPower_SDK_5_04_00_00\libraries\sfra) as fixed point is outdated and it would be helpful if you would share more details about the tutorial- you are following!

    User Guide for Latest SFRA: https://www.ti.com/lit/ug/spruik4a/spruik4a.pdf?ts=1739375551133

    Latest SFRA have a GUI and compensator designer support too

    Let me know, If you need further details.

    Thanks & Regards,

    Shashank

  • Hi Shashank,

    Thanks for the prompt reply. I guess I will try to use the floating point now. There is no simple example of how SFRA can be used with TMS320F28035, is there? A lot of examples that use different uC such as F2837x etc use:

    #include "driverlib.h"
    #include "device.h"

    Do we need to edit these two files to match our uC pins? 

    Thank you,

    here is an example of driverlib.h that is available in the (C2000Ware_DigitalPower_SDK_5_04_00_00\libraries\sfra) which seems to be applicable only for f28004x products

    ...
    #ifndef DRIVERLIB_H
    #define DRIVERLIB_H
    
    #include "inc/hw_memmap.h"
    
    #include "adc.h"
    #include "asysctl.h"
    
    #ifndef __TMS320C28XX_CLA__
    
    #include "can.h"
    #include "cla.h"
    
    #include "cpu.h"
    #include "cputimer.h"
    
    #endif
    .
    .
    .

  • I also have this issue 

    "../2803x_FlashAPI_BootROMSymbols.lib<__Release_TMS320x2803x_boot_rom_out__F
    lash2803x_Program_tmp.obj>" specifies ISA revision "C2800", which is not
    compatible with ISA revision "C28FPU32" specified in a previous file or on
    the command line ... 

  • The conclusion is that SFRA will not work with TMS320F28035 because it doesn't have FPU.