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.

Fail to generate Single pulse instead of continuous pulse.

Currently I'm working on AM335x processor to control PWM module.

 

I was able to enable PWM module on AM335x EVK and also set the timing as per setting that we want.

But now I'm having some problem to generate only one pulse. I do not want a continuous pulse.

 

Based on TI Technical Reference Manual, we can control the module using Time-Base Control Register(TBCTL).

I have tried to set bit 15-14 in Time-Base Control Register(TBCTL) to 1 which is to stop when counter completes a whole cycle and hoped that the module only generates one pulse. But in fact it does not. It continues to generate the pulse based on the setting that I set.

 

It is because when the counter reach the period value then it will be reset to 0 and start counting again. Hence it generates a continuous pulse instead of one pulse.

 

Is there anyway to prevent the counter to be reset to 0?

Is there any other register that I need to set so that I can only generate one pulse?

Could anyone please help me to advise the setting for the PWM module to generate only one pulse?