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.

Compiler/TMS320F28035: Pulse generation using GPIO and CPU timer interrupt-F28035

Part Number: TMS320F28035

Tool/software: TI C/C++ Compiler

HI

I want to generate PWM pulses having variable frequency and duty ratio using GPIO pins and CPU timer interrupts in F28035. Is that possible without EPWM?

If not then is there any sample base code available which I can work with?

please answer the query.Your help would be appreciated.

Thanks

Sagar

  • Hi Sagar,

    sagar shah54 said:
    I want to generate PWM pulses having variable frequency and duty ratio using GPIO pins and CPU timer interrupts in F28035. Is that possible without EPWM?

    This is possible but again at what frequency are you planning to generate this pulse?

    Regards,

    Gautam

  • Hi Gautam,

    I am planning to use at 8 MHZ. So if it is possible to generate PWM pulse then can you pls give me an overview on how to proceed.

    Thanks
    Sagar Shah

  • I am not sure to use what frequency but I am trying to run a stepper motor. so can someone help me with that?
  • Sagar,

    like Gautaum stated this is possible, at somepoint you will run into some CPU overhead issues. I am unsure exactly when this will happen, but it will depend on the frequency at which you are switching the PWM and the other code running on the core.

    Are you out of ePWM modules in your design?

    Have you looked at the APWM mode of the eCAP module? It works good for simple PWM signals, i expect you to get better results than toggling a GPIO.

    When driving a stepper motor many factors determine your required PWM frequency. I am not an expert in this area but with a little reading you should be able to determine the maximum PWM frequency required. A few thing that will effect the required frequency are:

    • Max RPM
    • Number of poles
    • Number of steps
    • Method of stepping(microstepping,halfstepping,full stepping)

    Hope it helps!
    Cody