Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4140

General • Re: Compatibily uf2 files

$
0
0
Turns out the RX pin on GPIO21 isn't an issue. The QT Py exposes TX and RX so of course both can be used on the same UART; UART1, GPIO20=TX, GPIO5=RX - Which is how 'stdin/stdout' does it as shown earlier.

The question is the UART1 CTS and RTS. Checking the RP2040 datasheet or a pinout which shows those -
  • UART1 CTS on GPIO 6, 10, 22 or 26
  • UART1 RTS on GPIO 7, 11, 23 or 27
Pin 26 (A3) and pin 27 (A2) are exposed on the QT Py and are already set as such in the existing '#define' so, yes, it should simply be a case of changing the "#define SERIAL_MOUSE_RX_PIN 21" to use "5" as suggested earlier.

This is the Adafruit QT Py RP2040 pin mapping as far as I can tell. It is a bit odd to have reversed the An and ADCn mapping but that's what the schematic shows -

Code:

 JP3        .-.         5V |O|     GND/0V |O|    ________ __________ ___________ __________ ________ ______        3V3 |O|   |        |          |           |          |        |      |       MOSI |O|---| GPIO3  | SPI0 TX  | UART0 RTS | I2C1 SCL | PWM1 B |      |       MISO |O|---| GPIO4  | SPI0 RX  | UART1 TX  | I2C0 SDA | PWM2 A |      |        SCK |O|---| GPIO6  | SPI0 SCK | UART1 CTS | I2C1 SDA | PWM3 A |      |         RX |O|---| GPIO5  | SPI0 CSn | UART1 RX  | I2C0 SCL | PWM2 B |      |            `-'   |        |          |           |          |        |      | JP1        .-.   |        |          |           |          |        |      |         A0 |O|---| GPIO29 | SPI1 CSn | UART0 RX  | I2C0 SCL | PWM6 B | ADC3 |         A1 |O|---| GPIO28 | SPI1 RX  | UART0 TX  | I2C0 SDA | PWM6 A | ADC2 |         A2 |O|---| GPIO27 | SPI1 TX  | UART1 RTS | I2C1 SCL | PWM5 B | ADC1 |         A3 |O|---| GPIO26 | SPI1 SCK | UART1 CTS | I2C1 SDA | PWM5 A | ADC0 |        SDA |O|---| GPIO24 | SPI1 RX  | UART1 TX  | I2C0 SDA | PWM4 A |      |        SCL |O|---| GPIO25 | SPI1 CSn | UART1 RX  | I2C0 SCL | PWM4 B |      |         TX |O|---| GPIO20 | SPI0 RX  | UART1 TX  | I2C0 SDA | PWM2 A |      |            `-'   |        |          |           |          |        |      | ST         .-.   |        |          |           |          |        |      |     GND/0V |O|   |        |          |           |          |        |      |        3V3 |O|   |        |          |           |          |        |      |       SDA1 |O|---| GPIO22 | SPI0 SCK | UART1 CTS | I2C1 SDA | PWM3 A |      |       SCL1 |O|---| GPIO23 | SPI0 TX  | UART1 RTS | I2C1 SCL | PWM3 B |      |            `-'   |________|__________|___________|__________|________|______|            
Thank you again for the information and explanations - I will try to check today whether it is enough to change the pin assignment according to what you wrote

Statistics: Posted by yabba235 — Thu Oct 24, 2024 7:52 am



Viewing all articles
Browse latest Browse all 4140

Trending Articles