Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variant.cpp Feather M4 points to PA27 for USB DP (D+) pin #260

Open
wa1tnr opened this issue Aug 31, 2020 · 1 comment
Open

variant.cpp Feather M4 points to PA27 for USB DP (D+) pin #260

wa1tnr opened this issue Aug 31, 2020 · 1 comment

Comments

@wa1tnr
Copy link

wa1tnr commented Aug 31, 2020

Feather M4 Express USB pin mapping in variant.cpp is presently incorrect on a single pin (DP aka D+).

https://github.com/adafruit/ArduinoCore-samd/blob/master/variants/feather_m4/variant.cpp#L92

Presently:
{ PORTA, 27, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP

Suggested:
{ PORTA, 25, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP

The schematic suggests PA25 for this pin function, rather than PA27 (which seems to be n/c in the schematic).

Supporting evidence below, including commit a7277e6
from DeanM in 2017, October.

Thanks! from github user wa1tnr


Feather M4 Express, schematic diagram:
https://learn.adafruit.com/assets/57242

Correctly identified variant:
https://github.com/adafruit/ArduinoCore-samd/blob/master/boards.txt#L637

Further evidence in the file's own history, first instance:
f618756#diff-8b717367c9aabdaaacc859b5b8471752L74

Tracing back, found an instance where it was correct:

{ PORTA, 25, PIO_COM, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // USB/DP

So it (DP aka USB D+, PA25) was correctly mapped, in commit a7277e6:

commit a7277e6
Author: dean [email protected]
Date: Fri Oct 13 18:15:20 2017 -0400

DM: adding feather m4

Didn't find where the change was introduced.

@ladyada
Copy link
Member

ladyada commented Aug 31, 2020

ok - it isnt necessary btw, its a placeholder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants