setTX - setRX causes board COM to disappear #2682
Replies: 4 comments 4 replies
-
I also run into this issue today. I wanted to remap the pins for Serial1 and Serial 2, but after flashing the Serial COM port does not appear again. |
Beta Was this translation helpful? Give feedback.
-
I had a short look into this. I wasn't aware that only defined pins can be used. But even with this pins the COM port doesn't appear. |
Beta Was this translation helpful? Give feedback.
-
It was my own stupid failure
Last two commands should be for Serial2 |
Beta Was this translation helpful? Give feedback.
-
I am having the same Issue. I want to use USB Serial for debugging. Serial1 as UART0 GPIO 0&1 and Serial 2 as UART1 GPIO 6&7. As soon i enabled Serial2 the COM Port disapears and i need to unplug the pico, press bootsel to upload a new firmware manually via draging the uf2 file again. What is causing this Issue? Help is appreciated. // Raspberry Pi Pico
// UART0 Pins
const int TX0_PIN = 0; // GPIO 0 as TX
const int RX0_PIN = 1; // GPIO 1 as RX
// UART1 Pins
const int TX1_PIN = 6; // GPIO 6 as TX
const int RX1_PIN = 7; // GPIO 7 as RX
void sendPacket(SerialUART &uart, uint8_t command, uint8_t *data, uint8_t dataLength);
void processIncomingPacket(SerialUART &uart);
void decodeCommand(uint8_t command, uint8_t *data, uint8_t dataLength);
void setup()
{
// Configure UART0 pins
Serial1.setTX(TX0_PIN);
Serial1.setRX(RX0_PIN);
// Initialize Serial1 with the required UART settings
Serial1.begin(19200, SERIAL_8E1);
// Configure UART1 pins
Serial2.setTX(TX1_PIN);
Serial2.setRX(RX1_PIN);
// Initialize Serial2 with the required UART settings
Serial2.begin(19200, SERIAL_8E1);
// Initialize built-in LED
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
// Initialize USB Serial for debugging
Serial.begin(115200);
while (!Serial)
{
// Wait for the Serial Monitor
}
.... |
Beta Was this translation helpful? Give feedback.
-
I am probing rp2040 GP4 for output using the sketch below and I am running in an issue.
After I flash the device with this code, the COM port stops appearing and the only way to reprogram it is by putting in into bootloader mode so it can appear as UF2 board again! The sketch works as intended, I can validate it with the oscilloscope.
Beta Was this translation helpful? Give feedback.
All reactions