Skip to content

remove duplicate RX/TX pin lines #4468

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

Merged
merged 1 commit into from
Mar 27, 2021
Merged

Conversation

jepler
Copy link

@jepler jepler commented Mar 23, 2021

These are duplicated above, next to the D0/D1 version of the pins; check out the full file to see it, it's outside the normal diff context.

@dhalbert
Copy link
Collaborator

They are reversed in one pair versus the other. Which one is right? TX/RX is 10/9 or 9/10?

@jepler
Copy link
Author

jepler commented Mar 23, 2021

oh my, I'll double check!

@jepler
Copy link
Author

jepler commented Mar 24, 2021

    { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_10) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_GPIO_09) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_GPIO_10) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_10) },
    { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) },

Before my change there are a magnificent THREE different pairs of UART RX/TX pins available!

Here's what I think I see: The two MP_QSTR_TX match up and the two MP_QSTR_TX match up (however they're in opposite order so you see 09/10 in one case and 10/09 in the other)

However, ESP_TX and ESP_RX are backwards -- they don't match RX and TX. DOUBLE HOWEVER I checked on how the PyPortal calls its ESP_RX/TX pins It connects the pin called ESP_TX to the ESP32 module's "TXO" pin, even though that makes it a receiving pin into CircuitPython. That is, these are "supposed to be" backwards as they're named from the ESP32's point of view.

esp32 portion of the metro m7 rev a schematic (slightly odd appearance due to importing in kicad instead of using eagle):
image

esp32 portion of the pyportal schematic:
image

So in summary, I think the change is right, the ESP_RX/TX are either right or "right", and I'd appreciate another look from you @dhalbert

@jepler jepler closed this Mar 24, 2021
@dhalbert
Copy link
Collaborator

@jepler did you mean to close this, or did you do this change in another PR?

@jepler jepler reopened this Mar 27, 2021
@jepler
Copy link
Author

jepler commented Mar 27, 2021

oops, glad you spotted my mistake

@ladyada
Copy link
Member

ladyada commented Mar 27, 2021

{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) }, is the correct RX pin

@jepler jepler merged commit 0102325 into adafruit:main Mar 27, 2021
@jepler jepler deleted the metro-m7-dup-pins branch November 3, 2021 21:10
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

Successfully merging this pull request may close these issues.

3 participants