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.

TIDM-02008: Dual interleaved instead of triple interleaved

Part Number: TIDM-02008

Hello,

I was wondering how big of a change would be required to modify the firmware in the TIDM-02008 project to be dual interleaved instead of triple interleaved. I don't see any macro that would easily change this option. It seems to me that I might be able to just ignore the third interleave, but then I assume I would have two lines 120 degrees out of phase instead of the 180 degrees out of phase desired. 

Please advise, and thank you for your time.

-John Kirkpatrick

  • HI John,

    I don't think it is going to be a big change. 

    As you mentioned, 2 PMWs have to be 180 degree phase-shifted rather than 120 degree phase-shift and remove all pwm/adc configurations related to the 3rd phase.

    Best,

    John

  • Hey John,

    Thank you for your response. A couple follow up questions then:

    -Do you know how to change the PWMs to be 180 degree phase shifted instead of 120?

    -Do you know if by removing the third interleave, the calculations performed won't be averaging in a 0 value?

    Thanks

  • Hi,

    1.You can change  pwm configuration in  EPWM_setPhaseShift in TTPLPFC_HAL_setupPWM (included in ttplpfc_hal.c).

    2. which averaging are you referring to?

    Best,

    John

  • Hey John,

    Thanks for the response, I see now where the phase shifting is set. Much appreciated. 

    I see functions like "TTPLPFC_read_acReturnCurrent()" inside ttplpfc.h that read from the current sensors and then multiply by 1/3, hence, taking the average of the 3 readings. Looking through the code a little more, I see this happening quite often, so I guess there isn't an easy answer other than to go search everywhere this happens and change it to averaging 2 sensor readings instead. 

    I'm a bit worried there are other consequences to modifying the code down to 2 interleaves that I may be missing, but I'll give it a go and see what I can come up with. 

    Thanks again for your time.

  • Hey John,

    Follow up question:

    If I were to use the F280039C TI board instead of the 49C board that the code is intended for, is there an easy way to make that change? I notice there are files such as "f28004x_flash_lnk.cmd" and I assume that I would need to replace that with a "f28003x_flash_lnk.cmd" file, but I'm not sure what other files may need to be replaced.

    Right now I can target the 39C board and upload the code to it, however, it gets stuck in device setup, I imagine because it has the memory locations setup for the 49C, not the 39C.

    Thanks.

  • Hey John,

    I'm in the main.syscfg editor where I am able to switch MCU target, I am able to select the F280039C board, however, when building the project I notice the files are still referencing the f28004x files, and the program crashes when trying to run it. 

    Not sure what the problem is. I did find a macro that I needed to change to run the 100 pin version, that at least gets me past the first function call (sometimes), but it still just crashes if I try to run the main program. 

    Any help is welcomed. Thanks again for your time.

  • Yes, you need to check where 3 phase averaging is used in the code.

    Also, you need to change all the device related files for 280039C such as code start branch, targer configuration and etc. we currently don't have a simple solution for the code porting. 

    Best,

    John