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.

TMS320F280049C-Q1: SFRA on F280049C

Part Number: TMS320F280049C-Q1
Other Parts Discussed in Thread: SFRA

Hi,

  I am trying out SFRA library to identify my Plant system (open loop) and design a compensator using F280049C Launchpad. I have gone through the user guide SPRUIK4A. I am using external ADC to acquire the data at 200 KHz, do some processing in the controller (control loops at 1KHz) and send the control signal to external DAC (at 200 KHz). I am using SFRA for the first time, followed the steps below and have some doubts.

1) The "example1_stb_f28004x_f32_tmu_coff" was imported to my workspace and build but it throwed following errors. What may be the reason ? Any library I failed to include ?

2) In the example projects in the SDK, 2 TMU projects are there viz **_f32_tmu_coff and **_f32_tmu_eabi. What's the difference between them and which should I choose ?

3) My CPU is almost fully used for other processing. So can I run the same on TMU alone ? If yes whether it still takes any CPU cycles ? In the user guide its mentioned as below. So if I use FloatTMU, then whether SFRA_INJECT and SFRA_COLLECT functions takes 37 and 67 CPU cyces ?

4) In the above image, what is SFRA_Background task doing ? At what frequency it should be called ?

  Thanks and Regards

      Karthik R

  • Hi,

       Any update ?

    Thanks and Regards

         Karthik R

  • 1. Karthik, this is an error due to some updates in the driverlib, please make the following changes to resolve this 

    in sfra_examples_settings.h

    #define PWM_H_GPIO_PIN_CONFIG      GPIO_0_EPWM1_A

    #define PWM_L_GPIO_PIN_CONFIG      GPIO_1_EPWM1_B

    ...

    #define SFRA_GUI_SCIRX_GPIO_PIN_CONFIG GPIO_28_SCIA_RX
    #define SFRA_GUI_SCITX_GPIO_PIN_CONFIG GPIO_29_SCIA_TX

    ...

    2. Coff and EABI are two types of object formats, EABI is the newer method. If you have no legacy use, please use EABI. 

    3. It will need to run on the CPU and the cycle numbers are indicated in the UG as you pointed out. 

    4. The background task is running the slow update of the state machine, you can call it at ~1mS, the SFRA GUI is also called at this rate. If you run it slower the GUI might not work or error out.  

  • Hi Manish,

      Thanks a lot for the reply. I was about to leave the SFRA option and start realization with custom code due to this issue.

       Now the project is building without any errors. Other answers are also clear and doubts are clarified except the following.

    1) SFRA_Background :- Should I implement a timer to generate 1ms interrupt in my code to execute this task in the isr..? As I mentioned earlier, my CPU is loaded with other tasks (10us Task and 5ms task. 5ms task is invoked based on a counter operating at 10us) and how I will proportionate the execution time for this background task ?

       I am having a slow task which executes at 200 Hz. But still if I use FloatTMU, it will take around 400 cycles (equivalent to 4us) which is on a high side, ryt. At the max I can spare 2us of this 200 Hz Task. What is the condition that it takes typically 50 cycles and maximum of 407 cycles as per the UG ?

       Thanks and Regards

           Karthik R