A power electronics controls in C/C++ embedded and software pointer for PC program


My project diagram is similar to this idea,

Lets say input is 3p 380VAC, 60Hz, Main Transformer MTR runs at 20kHz, DC output should be 50-147 v, charging current 100A. Should have CC and CV mode of operation.

I need to implement FW with following facilities,

1. Shunt/ Temperature sensing

2. 3v AC to 16 bit ADC having channel current and voltage

3. CAN/SPI/SCI protocol

4. PF correction, PI or PID control

5. PWM for high frequency switching.

6. Relay control

7. Alarm control 


I am confusing to run/build/ debug a very versatile embedded program that has a variety of .asm, header and source files. Using the TI ccs v.6.0.2 compiler.
Beside main.c it has a control.c file. Those are nothing but representing work flow timer and cases. F28069 is my goal for control the whole system considering ADC, PWM switching, shunt sensing and battery charging and discharging monitoring.

DSP programming and assembly instructions are documented well from the website.

Driver files and datasheet can easy-to-use in the system and register values and functions are understandable. Most of them are customized and not as usual examples. Registers are easy to define the memory.

What I feel is very difficult to implement a PID control developed in C or C++. Some mathematical libraries are not understandable and tables and conditions has made me puzzled.

It has 355 variables in .out file and those are connected with a PC program to change the ADC values, could display the output parameters. In this sense software program is also involved.

Now could you kindly give some tips to handle the whole project? If you think arm.com has similar code example,  feel free to inform me.

I am writing here because it has many do loop/ if /for/ case/ stuck/ break instructions data type and many  more. Functions are called randomly.

Help me to understand read/write/captures also.

More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.