Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Newbie Question Regarding Pin Assignments

  1. #1
    Junior Member
    Join Date
    Mar 2019
    Posts
    17

    Newbie Question Regarding Pin Assignments

    When I look at the pin assignments for my Teensy 3.5, I see that many pins have multiple "alternate" functions, and some of them have the same alternate functions. Is it correct to say there is no problem, or chance of conflict, by using pins with the same alternate functions for different things? For example, am I correct in saying that I can set Pin 21 to a PWM output and Pin 27 to LOW even though they both have the same alternate RX1 functionality? I'm chasing down a bug and trying to eliminate as many possible causes for it.

    Thanks

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,002
    as long as it’s operation is not of the same peripheral port access yes. one pwm and 1 gpio is 2 different things, but dont expect 2x Serial1 TX pins to work together. It’s basically a multiplexer.

  3. #3
    Junior Member
    Join Date
    Mar 2019
    Posts
    17
    Quote Originally Posted by tonton81 View Post
    as long as itís operation is not of the same peripheral port access yes. one pwm and 1 gpio is 2 different things, but dont expect 2x Serial1 TX pins to work together. Itís basically a multiplexer.
    Thanks.. I'm seeing strange PWM behavior on pin 21 and was wondering if there could be an issue because I'm doing GPIO on pin 27 (they both happen to be capable as functioning as RX1, even though I haven't set them up as such). My concern was whether the multiplexer can introduce such issue.

  4. #4
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,384
    It can‘t. As long as you do not willingly mux one peripheral to two different pins, the mux is quite fool proof.

  5. #5
    Senior Member
    Join Date
    Feb 2017
    Posts
    276
    The multiplexing is on a per-pin basis. There should be absolutely not problem using Pin 21 for PWM and Pin 27 for GPIO. If you're "seeing strange PWM behavior", it's due to some other reason.

  6. #6
    Junior Member
    Join Date
    Mar 2019
    Posts
    17
    Thanks all, I just wanted to scratch that off the list.. I think it's time to break out the oscilloscope.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •