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/CC3220MOD: CC3220MOD

Part Number: CC3220MOD


Tool/software: Code Composer Studio

Hi,

The GPIO_09 is used to generate PWM. Now, I have two questions:

The first question is that is it possible to change the initial value of the PWM in CC3220MOD? You can see the picture below, fig. 1(a) is the original PWM generated by GPIO_09. Fig. 1(b) is what I needed. Is that can be implemented?

The second question is that three CC3220MOD are used on three different boards. Since each board has its own power switch, it is difficult to power on all three boards at the same startup time. This means that the counters of the three CC3220MOD are difficult to synchronize. So is there any way to solve this problem?

  • Hello,

    1. I cannot see the attachment/figures you're referring to. If by value you mean the duty cycle then yes, this should be possible.

    2. I've never done this before but maybe on idea is to have all 3 connect to NTP server and schedule to initiate a counter at the same time.

    Jesu

  • Hi Jesu,

    Thanks for your reply.

    For the first question, it's not the duty cycle. I inserted the picture again in this reply. Can you see it now?

    Best regards,

    Xinrong

  • Hello,

    Yes I see the image now but I do not understand the question. PWM generates a square wave and the figures you provided are sawtooth waves. Are you trying to generate sawtooth waves using PWM? Also, I noticed fig 1. b is the same wave but starts at a different point. Is this what you mean by changing the initial value?

    Jesu

  • Hi Jesu,

    Thanks for your reply.

    Fig 1(a) and Fig 2(b) are the counters used for generating the PWM pulse. I am trying to add an initial offset between the counters in board 1 and board 2. As I understand setting the period using pwm.h API sets the down count value in the timer. 

    So my question is, can I set an initial offset in the timer (Time2B) count value used for generating PWM pulse in pin 64 (GPIO9) as shown in Figures.

    Best regards,

    Xinrong

  • Hello Xinrong,

    If I understand you correctly this should be possible. All the timer registers are R/W so you can load whatever initial count you want. Please refer to the TRM for more details.

    http://www.ti.com/lit/ug/swru465/swru465.pdf

    Jesu