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.

TMS320F28022: DSP processing performance against MCU

Part Number: TMS320F28022
Other Parts Discussed in Thread: C2000WARE

Hi Team,

I want you to share some study cases of the difference in the number of steps between DSP and MCU to be able to understand well the DSP's advantage.
If the following processing is executed, how many clock step can DSP(like TMS320F28022) reduce compared to the MCU(like MSP430FRXXXX)?

Also, let me know if there is good app note to learn such the differences.

Main routine
1.Get current value though internal ADC Block
2. Digital filtering(FIR ot FII)
3. Compare current value to setting current
4. Adjust Pulse wide of PWM by PID control

Sub routine
- Set current target through SPI from main MCU
- Get current value through SPI from main MCU


Takashi Onawa

  • Takashi Onawa,

    I don't know of an application note which covers what you are asking. Also, I can't comment from the MSP430 side - it may be worth posting similarly on that forum if you're looking for that comparison. Please find below a few general comments which I hope will be helpful.

    1. In switched power control, sampling is more complex than just reading the ADC. The converter ust be triggered at precise instants of time and aligned exactly with the PWM waveform. Few devices are capable of doing this well - the C2000 is one of them. Once configured and enabled, the C2000 ADC generates interrupts only when a fresh reading is available. Software is not involved in the sampling process, so it happens with low latency and no jitter. It takes a few 3-4 cycles to read the ADC result register from an ISR in C.

    2. There are fixed-point filtering benchmarks (the device you selected is fixed-point) in C2000Ware. The cycle count depends on the order and type of the filter. If you install the latest version at the default location, the documentation will be at:
    (Note - in a control loop you would not normally perform filtering like this)

    3. Subtraction is single cycle on C28x, but you will need to handle numeric format on any fixed-point device. The IQmath library (again in C2000Ware) provides an efficient way for this to be done on C2000.

    4. The C2000 application examples are replete with the use of PI and PID control for modulating PWM duty cycle. For a new design you should look into the DCL. A full featured fixed-point PID takes 99 cycles, and you would need ~20 or so cycles to format the result and write it to a duty cycle register. Consider also, that PWM generation for switched power systems can be a very complicated topic.

    The communication of data over SPI is not a time critical action in the context of control. I can't point you towards any specific information on that.

    As a general resource, you may like to review the C2000 digital power supply workshop, here:

    It's rather old, but the concepts may still be useful.

    I hope this helps.  Feel free to post back if anything's unclear.