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.

TMS320F28379D: Can SFRA run on CPU2?

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

Hi,

We were able to run the SFRA library on the CPU1 of TMS320F28379D, now we want to run the library on CPU2, for that, I removed the library changes from CPU1 and did the same changes on CPU2 (init, linker, etc.), the software builds fine but when we start the SFRA the freqIndex doesn't get incremented by the SFRA_F32_runBackgroundTask() function. I checked with a breakpoint to confirm this routine is getting called.

Note we are not using the GUI but we can extract the data from the SFRA arrays and we can also monitor how the inject function works when we ran SFRA on CPU1. I was expecting SFRA can run on CPU2 with the same changes. We are NOT trying to run SFRA at the same time from CPU1 and CPU2, I'm not sure if it is possible.

Thanks,

Gabriel

  • Hi Gabriel,

    I do not see a technical reason why SFRA will not work on CPU2, but that being said I have never tested it myself on CPU2. 

    Are you using the TMU version of the library ? 

    -Manish 

  • Hi Manish,

    Yes, I'm using the TMU version. I have 3 different branches:

    1. SFRA working fine on CPU1

    2. SFRA not working on CPU2, only the first element of the Arrays is filled in when I start SFRA, this is due to the index not being incremented

    3. SFRA in both CPUs, using sfra1 and sfra2 structures one per CPU. The sfra1 structure works from CPU1, the sfra2 doesn't, however when I start cpu1 the inject function works in both CPUs, I can see how the variable on CPU2 gets affected by the inject call, but the collect function doesn't fill in data on the sfra2 arrays. The sfra1 works fine like in branch 1.

    A separate issue, not blocking just taking the opportunity to mention it. On branch 1 I was getting a compile error:

    undefined first referenced
    symbol in file
    --------- ----------------
    logf C:/ti/c2000/C2000Ware_DigitalPower_SDK_3_02_00_00/libraries/sfra\lib\sfra_f32_tmu_eabi.lib<sfra_f32_tmu_background.obj>

    The only way I can solve this error was by adding this to the file.

    float32 LfPFC_X;
    LfPFC_X = logf(10);

    Thanks,

    Gabriel

  • Is it  possible for you to comment out the SFRA 1 on the CPU1 and only run SFRA on CPU2 ?

    Also please check where your global variables are located, I will suggest to put the SFRA releated variables in Local Shared LSx RAM only and not in GSx RAM.

  • Hi Manish, the issue was in the linker file for CPU2 and the GSx RAM configuration for CPU2 to have access to that memory block. I have sfra1 and sfra2 structures that independently can start SFRA on CPU1 or CPU2. 

    Thanks for your support.