GrandCentral analogWrite/PWM missing pins

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pbruno
 
Posts: 57
Joined: Tue Sep 27, 2016 12:15 pm

GrandCentral analogWrite/PWM missing pins

Post by pbruno »

Hi... 2x GrandCentral M4's, using latest library on Arduino... the following pins do not output PWM on the following pins. Others work correctly according to GC learning system of D2-D9, D11, D13-D45, D48, D50-D53 (I did not check analog or SPI pins):

11, 15, 16, 17, 20, 21, 22, 29, 32, 33, 36, 37, 40, 41, 42, 43, 44, 45, 48, 50, 51, 52, 53

Any ideas?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: GrandCentral analogWrite/PWM missing pins

Post by adafruit_support_mike »

Are you configuring the pins one at a time, or trying to do multiple PWM signals at the same time.

PWM output from 32-bit microcontrollers is a bit complicated: the signals are generated by the Timer/Counter (TC) or Timer/Counter for Control (TCC) peripherals. Each instance of a TC peripheral can generate two signals, and each instance of a TCC peripheral can generate 8 signals.

The peripherals don't have a direct connection to the pins the way they do in an 8-bit microcontroller though. All of the physical pins are connected to one side of a multiplexer, and all of the peripherals connect to the other side.

Each TC and TCC output signal has multiplexer connections to multiple pins, and the same physical pin can have possible multiplexer connections to multiple TC and TCC instances.

That means there are constraints on connections. If you have a group of five physical pins that all share connections to the same three TC/TCC output channels, only three pins in that group can do PWM at the same time. All five pins can do PWM individually, and you can get PWM on any set of three pins selected from the five, but you can't get more than three simultaneous PWM signals from those five pins.

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”