diff --git a/rp2040_uart/2024-03_rp2040-uart.md b/rp2040_uart/2024-03_rp2040-uart.md index 613cf3ba9da1c8c9212bfdc898b70292e4384394..bf9099baff83b1fb18482cb946e3731cd8063f02 100644 --- a/rp2040_uart/2024-03_rp2040-uart.md +++ b/rp2040_uart/2024-03_rp2040-uart.md @@ -12,4 +12,23 @@ So, as for reasonable goals for today, I should basically just try to throw-and- Well actually, fk it, I will use the online pioasm for the time being... -And we're up with a test, I will find the BAUD limit next, and check if that is affected by changes to f_cpu... \ No newline at end of file +And we're up with a test, I will find the BAUD limit next, and check if that is affected by changes to f_cpu... + +This should be simple: we have output is + +```cpp +float div = (float)clock_get_hz(clk_sys) / (8 * baud); +``` + +So we should be able to to clk/8 : 16MBit/s, and indeed we can see things working up to 15MBit/sec. To get to 30, we can crank the CPU to 250MHz. + +| Mbit/s | Traces | +| --- | --- | +| 1 |  | +| 2.5 |  | +| 10 |  | +| 15 |  | +| 25 |  | +| 30 |  | + +But this is not terribly interesting: we want to see that we can catch words fast enough: the ISR on the RX side is normally where we meet our limits. \ No newline at end of file diff --git a/rp2040_uart/code/uart_pio/uart_pio.ino b/rp2040_uart/code/uart_pio/uart_pio.ino index 5e83bc668639d6eef3b32f46d35c0658c0d81d97..12becd59659c683577ac741cf05c6222bde05a44 100644 --- a/rp2040_uart/code/uart_pio/uart_pio.ino +++ b/rp2040_uart/code/uart_pio/uart_pio.ino @@ -9,7 +9,7 @@ // on XIAO "TX" - GPIO 0 #define PIN_TX 0 -#define PIO_BAUD 115200 +#define PIO_BAUD 30000000 // the PIO, and statemachine ? PIO pio = pio0; @@ -38,6 +38,7 @@ void loop(void){ digitalWrite(PIN_DEBUG, HIGH); // blocking tx-put: uart_tx_program_putc(pio, sm, 85); + delayMicroseconds(100); digitalWrite(PIN_DEBUG, LOW); // ... if(lastUpdate + updateInterval < millis()){ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-10mb.png b/rp2040_uart/images/2024-01-03_uart-tx-10mb.png new file mode 100644 index 0000000000000000000000000000000000000000..3f06944c3c64915f8799ae32d3cfa909617f8d79 Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-10mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-15mb.png b/rp2040_uart/images/2024-01-03_uart-tx-15mb.png new file mode 100644 index 0000000000000000000000000000000000000000..34ce0d432c93d705df3eba7e1897599d5e40a08e Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-15mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-1mb.png b/rp2040_uart/images/2024-01-03_uart-tx-1mb.png new file mode 100644 index 0000000000000000000000000000000000000000..f3ba89de4edab3e6776ddd7433425ebdca59647b Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-1mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-20mb.png b/rp2040_uart/images/2024-01-03_uart-tx-20mb.png new file mode 100644 index 0000000000000000000000000000000000000000..75bf69c1549cad3e284163de085d5e8a894805a2 Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-20mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-25mb.png b/rp2040_uart/images/2024-01-03_uart-tx-25mb.png new file mode 100644 index 0000000000000000000000000000000000000000..768f6dd40d1b79fca30bdfd5eb5e2faafc8d4b65 Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-25mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-2mb.png b/rp2040_uart/images/2024-01-03_uart-tx-2mb.png new file mode 100644 index 0000000000000000000000000000000000000000..430880bd9e6bcba4ca34ce8f2fd8f26de250d27d Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-2mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-2p5mb.png b/rp2040_uart/images/2024-01-03_uart-tx-2p5mb.png new file mode 100644 index 0000000000000000000000000000000000000000..1e4ea3121e05b7f9377f6b57e9d4f33a953f1818 Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-2p5mb.png differ diff --git a/rp2040_uart/images/2024-01-03_uart-tx-30mb.png b/rp2040_uart/images/2024-01-03_uart-tx-30mb.png new file mode 100644 index 0000000000000000000000000000000000000000..b5aae6ec83355de59f930e3072dfc9fd17d9cba0 Binary files /dev/null and b/rp2040_uart/images/2024-01-03_uart-tx-30mb.png differ