Selecting PWM with TCC1 using Atmel Studio - no output

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


I am using the SAMD51 processor and having trouble creating a PWM component.  I have created 5 successful PWM outputs (using TC2, TCC0, TC4, TCC4 and TC5).  When I go to create a new one on my "PA12" output, I get no output.  All the other PWM outputs work well.  I have to use PA12 because the board is complete.  If I try PA12 on another Clock like TCC0, it works, but because of the chip restrictions, there are only 3 clocks that PA12 uses (section 6.1 "Mulitplexed Signals"), and the other 2 (TC2 and TCC0) are already in use by other PWM outputs.

 

What am I missing in the TCC1 setup that would lead to no PWM output oscillation?  Thanks!

 

Here's my configuration:

This topic has a solution.
Last Edited: Thu. Apr 8, 2021 - 04:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The setting for Waveform Channel Select is what you are missing.

https://community.atmel.com/foru...

/Lars

 

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

Hi Lars,

 

Thanks so much for your quick response.

 

That seems to work for PA12 using TCC1, setting the Waveform Channel Select to 2 and the Capture Channel to 2.  Now I'm seeing PWM output.  Where do I find this information in the manual?

I have another channel now, PB30, that I want to enable.  If I use TCC0, and PB30 becomes WO/6, what Waveform Channel do I need?  How do I know WO/2 is channel 2 and WO/6 is channel 0?

 

Thanks so much.

 

-Peter

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well it's certainly not crystal clear in the datasheet, the default configuration in Table 49-4. "Output Matrix Channel Pin Routing Configuration" is what I find also is the default when not using the waveform extension.

So for your case on TCC0 which has  6 compare channels the 8 outputs will be from the channels 0, 1, 2, 3, 4, 5, 0 and 1.

Obviously it's important to know the number of channels and the number of outputs (since this is not the same for each TCC instance), check Table 6-9. "TCC Configuration Summary" for this information.

/Lars

 

 

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

Thanks for your help.  You've gotten me up and running with all my PWM devices now.  I'm marking this issue "resolved".

 

-Peter