UART Baudrate Issue on MilkV Duo256M Module

Hi everyone,

I’m currently working on the MilkV Duo256M module and using UART for communication. The setup works fine at a baudrate of 230400, and the UART device opens successfully with the following code:

// Initialize WiringX library
printf("Initializing WiringX...\n");
if (wiringXSetup("milkv_duo", NULL) == -1) {
    fprintf(stderr, "WiringX setup failed: %s\n", strerror(errno));
    wiringXGC();
    return -1;
}
printf("WiringX initialized successfully.\n");

// Open UART device
struct wiringXSerial_t serial_config = {UART_BAUD_RATE, 8, 'e', 1, 'n'};
uart_fd = wiringXSerialOpen(UART_PORT, serial_config);
if (uart_fd < 0) {
    fprintf(stderr, "Failed to open UART device: %d\n", uart_fd);
    wiringXGC();
    return -1;
}

However, when I try to increase the baudrate to 460800, the UART device fails to open. I’ve ensured the wiring and setup are correct, but no matter what I do, the device won’t open at higher baudrates.

Has anyone experienced a similar issue? Is there a limitation on the maximum baudrate for the UART interface on the MilkV Duo256M module, or am I missing something?

Any suggestions or advice would be much appreciated! Thanks in advance.

1 Like

Same here! I’m facing the same issue on Duo-S (SG2000).

1 Like

Hello, I would like to ask how the two duo boards communicate with each other? For example, duo256m and duos, what functions do I need to write after I connect them to the serial port? What to do? Thanks for the suggestion!

Any.
A serial line is a hardware protocol. After you connect two boards over serial line, you’re limited only with your imagination, the baudrate of the UART line, and your skills of programming in C.

Can start with Duo Examples.