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.

PFC with 2806x

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28035, TMS320F28027, TMS320F28069

 

I have made the board for the digital PFC with F2806x microcontroller. The schematic and microcontroller I/O-configuration is based on the Bridgeless PFC demo kit, which originally is designed with a F28035 microcontroller. please suggest the bare minimum changes required to run the original F28035 program in the F28069?

  • Hi Jai,

    please suggest the bare minimum changes required to run the original F28035 program in the F28069?


    You won't observe much of a difference between these two controller's coding structure. Also, suggesting you the changes isn't practical. The simplest way to achieve this is... compare the sample codes of the peripherals you use.

    Regards,
    Gautam
  • Hi Jai,

    In addition to what Gautam has mentioned, I will refer you to two documents.

    1) C2000 Peripheral Reference Guide (outlines peripheral changes between devices)
    http://www.ti.com/lit/spru566

    2) F2802x/3x to F2806x Migration Guide:
    http://www.ti.com/lit/sprabj2

    ---

    In general, the F2806x is a superset of the F2803x.  If you have code that works on the F2803x, it should work on the F2806x with very minimal changes.  Obviously, you may need to do more if you wish to use any of the added features that exist in the F2806x.

    I would recommend (1) replacing your F2803x linker command file with one for the F2806x and (2) changing your project's header files to the F2806x version.  An example .cmd file and the F2806x header files can be found in controlSUITE.


    Thank you,
    Brett

  • Hai Gautam &Brett,

    Thanks for the suggestion. I have changed the linked command files as per the 28069 example. I have replaced include paths and supporting header files with 28069. Now I am getting below error in the compiler. But the same code is working with 2803x series. I am giving the statement and instruction name.

    SineAnalyzer_MACRO ((sine_mainsV)); // expression must have integral type

    Any other changes are required for the migration. What about the floating point math and IQ Math??? Please suggest.
  • Jai, this is some kind of datatype mismatch! Can you check out the same?\

    Any other changes are required for the migration. What about the floating point math and IQ Math??? Please suggest.

    Respective libraries have to be incuded in the Project -> Properties

    Regards,
    Gautam
  • Hi Gautam,

    But the same code is working with 2803X. If i replace the header files and include files in project properties with 28035 . It is working fine. The error is coming with 28069 only.
  • Did you refer the migration guide? Have you followed it thoroughly? F28069 has fpu32 .... and hence you need to use "rts2800_fpu32.lib"; in similar way you've to select fpu32 in 'Specific floating point support' - all of this is available in Project -> Properties.

    Regards,
    Gautam
  • Dear Gautam,

    I have followed the migration guide. Initially the code has been developed for TMS320F28035. It does not have floating point support. I think it is using IQ Math. Now we are porting the same code with floating point version (28069). Is there any other changes required in the software. Please suggest. 

    Regards,

    Jai

  • First of all, have you created a new project or editing the same for F28035?
  • I am editing the same project with the F28069 in place of 28035.
  • Its just a PFC example (28035) available in control suite and I am trying to modify it with 28069.
  • This is a mistake as you'll have to make lot of changes.... That's why I suggested you to go through F28069 sample project to study its structure and project properties. You'll have to follow the same include paths etc...
    Ideally it would've been better if you'd edited a F28069 based sample project.

    Regards,
    Gautam
  • I actually disagree with Gautam here.  While what he has suggested is certainly a valid option, I don't think it will be easier or more worthwhile.  Obviously you can choose either route based on what you're most comfortable doing.

    From doing this kind of work previously, porting a project that works on the F28035 to the F28069 is not too difficult.  It sounds like you've done the main part, but now a few compilation issues have popped up because of the change.  The F28035 and F28069 are very similar, but not exact.  What you're seeing is normal.  You'll just need to debug and resolve the issues one-at-a-time.  I don't have any specific feedback to help you on this process.

    For FPU vs IQMath:  I'd recommend compiling the code in fixed-point and exactly as it was done in the F28035 project for now (if that F28035 project uses IQMath, use IQMath; if not, don't) - the FPU adds instructions it doesn't modify existing C28x core instructions.  First get everything to compile and get things working on the F28069.  After this step, you can then work on utilizing the FPU/adding other new features.


    Thank you,
    Brett

  • Dear all,
    Why there is not a project of a Pfc with f20069 as done for the buck?
    However, I have tried to carry the F28035 program  in a F2806 9program but nothing works (ADC, PWM,with in open loop).
    Please can someone help me?
    Thank you

  • For digital PFC a 60 MHz F28027 or F2803x is sufficient. You don't need the higher performance of F28069. That is why we used F2803x.

    For the BLPFC, you have to verify the code step by step, Build 1 first, then Build 2 and Build 3. This is outline in the user guide. Also, review the F28069 Buck example project to see how 28069 ADC and PWM modules are used in that application. You have to follow the same approach and modify the 2803x BLPFC code accordingly in order to run it on F28069.

    Shamim

  • Hi Nicola,

    The F28069 is more expensive than the F28035 and closer to the needs of much of the market.  Also, because the F28069 is similar to the F28035, we prioritized the release of a F28035 project.  The code should be extremely similar.

    I recommend breaking the problem into smaller parts - start with the PWM (and make sure that when you edit a variable it affects the duty cycle), then you can move on to the ADC alone.  Work in this way until you have confidence in the peripherals (and the algorithms) and then start proving out the larger system.


    Thank you,
    Brett

  •  I understand your reasons , but is easier to convert the

    software in tms320f28027 rather than in tms320f28069 ?

    I tried to convert the software in f28069 and pwm works but the adc doesn't work,

    then I tried to convert the software in f28027 but it's locked in a follow routine:

    ISR_ILLEGAL void interrupt (void) // Illegal operation TRAP

    {   

         // Insert ISR code here
         // Next two lines for debugging only to halt the processor here   

         // Remove after inserting ISR Code   

          asm ("ESTOP0");    for (;;);
    }

     

    Thanks for your help