I chose the wrong pin for PWM - now what?

mrm

Member
I'm sure this is a case of GPIO 101 (i.e. very obvious) but I just want to check.

I accidentally chose Teensy pin 38 for a PWM output, had PCBs fabricated, assembled the board and soldered Teensy into place...

... then discovered that pin 38 is not an option for PWM.

Rather than doing something unmentionable to the pin header that connects this pin to my board involving melting plastic with a soldering iron, can I short 38 and 37 together and set 37 as my PWM output instead? (assuming I make sure not to set pin 38 as an output or input)?

NB the PWM output is sending 20MHz to a clock input for another IC on my board, with a 10R resistor in series...
 
I'm guessing this is Teensy 4.1?

Usually shorting an output pin to an unused pin is fine. On Teensy 4.1 the unused pins default to a weak "keeper" circuit. You might use pinMode(38, INPUT_DISABLE) to put the pin into its highest impedance mode.
 
Dear Paul, yes Teensy 4.1.

Thanks for confirming. I'll use INPUT_DISABLE as suggested and short the pins.
 
Back
Top