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.

CCS/TMS320F28069: CCS How to Get PWM signal with Duty Cycle to control - Generating & Controlling PWM with 10% that drives the Motor at Constant RPM

Part Number: TMS320F28069
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Hello All,

I'm using given example project Proj_lab05d for the Motor control speed control. 

After I entering into the Debug mode, I have initialized all the variables "gMotorVars.Flag_enableSys" , "gMotorVars.Flag_Run_Identify" & gMotorVars.SpeedRef_krpm with 10 Q-Value,

When we give small value in "gMotorVars.SpeedRef_krpm" the motor rotates in the slower manner and keeps on increasing the RPM upto Maximum RPM level.

How can I achieve the constant RPM in the Motor by Generating the some(10)% duty cycle in the PWM.

My motor is A2212/13T - 1000kv - Voltage:10V Current:0.5A

1. I need to know we can control the PWM signal in the code operation. How we can achieve the some(10)% duty cycle in the code operation.

2. Also please tell me is there any GUI for the Motor Control support.

3. And also tell me MATLAB how we can integrate the CCS environment

Thanks in advance, If you help for this it would very much indeed and thankful,

Thanks for continuous Support,

Regards,

Chandrasekar P

  • The PWM compare register is updated with the output of the SVGEN module, typically in the last few lines of the mainISR() in the Motorware labs. If you want to manually manipulate the duty cycle, you'll need to manually manipulate the values being updated in the compare registers. The compare registers are updated in the HAL_writePwmData() function, please have a look and see how this is accomplished for a better idea of how to manually manipulate the duty cycle.

    I believe this is the GUI you are looking for: www.ti.com/.../instaspinuniversalgui

    For what you want to do though, I would recommend working closely with the source code instead of the GUI. You are option limited if you use the GUI.

    I would recommend you contact Mathworks regarding CCS integration with their platform.

    Sean
  • Hi,

    I don't really understand question #3. What do you want to do? 

    -Brian

  • Hi Brian,

    It's like integrating the MATLAB with CCS IDE by through Embedded Coder. I have seen a video in Youtube which generates the code from Model and Directly build that into the ECU/MCU boards F28069. Which generates the PWM signal and makes the Motor to run.