ATSAMD21G18 and PWM output

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All

 

This is the first time I am using a SAM device(ATSAMD21G18 ). From my understanding, each pin on the device has associated with PWM channel and a specific timer.

 

I am reading the datasheet  SAM D21 Family Data Sheet (microchip.com)

 

In relation to PWM what the difference between  "TC/Waveform Output Channels per TCx Instance"( 5/2 )and " Waveform Output Channels per TCCx Instance" (8/4/2)  is? This is shown on page 14

 

 

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The TC and TCC peripherals are different. Each TC has 2 waveform outputs and the ATSAMD21G18 has 3 TC hence 3/2 for your device on page 14. The TCC instances don't all have the same configuration, ATSAMD21G18 has 3 and they have 8, 4 and 2 waveform outputs respectively. There is more detail about the TCC instances in section  7.2.5, including this which is important to know:

The number of CC registers (CC_NUM) for each TCC corresponds to the number of compare/capture channels, so that a TCC can have more Waveform Outputs (WO_NUM) than CC registers.

So look at CC_NUM there for the number of unique PWM outputs each  TCC supports.

 

djoshi wrote:
From my understanding, each pin on the device has associated with PWM channel and a specific timer.

There are actually a few pins that are not possible to use with any TC/TCC outputs.

/Lars

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks

 

What is the difference between the TC and TCC?

 

So its best to use TCC for PWM?

 

So if a TCC pin has 8 waveform output, that means it can be output 8 different PWM? So why would it be necessary to have 8 output on a single pin? Can you not just adjust the firmware to adjust to the waveform.

 

Regards

 

DJ

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

djoshi wrote:

So if a TCC pin has 8 waveform output, that means it can be output 8 different PWM? So why would it be necessary to have 8 output on a single pin? Can you not just adjust the firmware to adjust to the waveform.

 

TC outputs its 2 PWMs on 2 different pins, and TCC  outputs its 8 PWMs on 8 different pins

John Malaugh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok,

So what is the difference between the TC and TCC interms of pwm output?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You will have to check the datasheet but the TCC (depending on the instance) have a lot of PWM related advanced features (Table 7-7. TCC Configuration Summary).

/Lars