6 years, 4 months ago.

Serial pasthrough does not work

Hi ,

I'm using the MAX32620FTHR board. I tried using the serial passthrough but it does not work. When sending data from debug serial to serial device which is a FT230 serial converter I can see the data.

When sending data from the other way round from device to debug serial it does not work.

Are all serial instances sharing the same buffer on this board? I have not looked at the underlying code.

Any time I use more than 1 serial it seems the communication freezes. I initially tried this with not much success.

#include "mbed.h"

Serial pc(P2_1, P2_0);
Serial device(P3_1, P3_0);

int main() {
    while(1) {
        if(pc.readable()) {
            device.putc(pc.getc());
        }
        if(device.readable()) {
            pc.putc(device.getc());
        }
    }
}

Then I modified setting and I see the same results. Program below also does not work.

#include "mbed.h"
 
Serial pc(P2_1, P2_0);
Serial device(P3_1, P3_0);

DigitalOut rxLed(LED1);
DigitalOut txLed(LED2);
 
int main() {
    pc.baud(115200);
    device.baud(9600);
    
    pc.printf("Serial test! \r\n");
    device.printf("Serial test! \r\n");
       
    
    while(1) {
        if(pc.readable()) {
            device.putc(pc.getc());
            txLed =! txLed;
        }
        if(device.readable()) {
            pc.putc(device.getc());
            rxLed =! rxLed;
        }
    }
}

Be the first to answer this question.