-
-
Notifications
You must be signed in to change notification settings - Fork 213
Description
I'm using the RP2040 as an USB interface to connect the PC with another CI (CC1352 of TI) with a simple SerialPassThrough code
unsigned long baud = 115200
void setup() {
//Begin Serial ports
Serial.begin(baud);
Serial1.begin(baud);
}
void loop() {
//SerialPassthrough
if (Serial.available()) { // If anything comes in Serial (USB),
Serial1.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
}
if (Serial1.available()) { // If anything comes in Serial1 (pins 0 & 1)
Serial.write(Serial1.read()); // read it and send it out Serial (USB)
}
}
The issue:
When I send a simple string from the Arduino Serial Monitor (Or any other serial software) I can see it in the Serial 1 correctly, but when I try loading a .hex file for programming the other chip, nothing happens.
Both tests were seen in an osciloscope, and theres no output at the second test.
I have another board where I use a SAMD21 at the same application (even with the same TI chip), and there I don't have any problem to do this. So I tried making a bridge:
USB <-> SAMD21_Serial <-> SAMD21_Serial1 <-> RP2040_Serial1 <-> RP2040_Serial2 <-> CC1352
And it works corectly.
Then I switch the SAMD and the RP like this:
USB <-> RP2040_Serial <-> RP2040_Serial1 <-> SAMD21_Serial1 <-> SAMD21_Serial2 <-> CC1352
And it doesn't works.
Looks like the problem is not at the SERCOM (Serial1 & Serial2) ports but is in the USB (Serial) buffers or in the trasition of the data between the Serial and Serial1.