Skip to content
Snippets Groups Projects
Commit 168558b7 authored by Jake Read's avatar Jake Read
Browse files

uart txes, now to catch

parent 38434b0c
Branches
No related tags found
No related merge requests found
......@@ -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 | ![img](images/2024-01-03_uart-tx-1mb.png) |
| 2.5 | ![img](images/2024-01-03_uart-tx-2p5mb.png) |
| 10 | ![img](images/2024-01-03_uart-tx-10mb.png) |
| 15 | ![img](images/2024-01-03_uart-tx-15mb.png) |
| 25 | ![img](images/2024-01-03_uart-tx-25mb.png) |
| 30 | ![img](images/2024-01-03_uart-tx-30mb.png) |
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
......@@ -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()){
......
rp2040_uart/images/2024-01-03_uart-tx-10mb.png

18.8 KiB

rp2040_uart/images/2024-01-03_uart-tx-15mb.png

16.1 KiB

rp2040_uart/images/2024-01-03_uart-tx-1mb.png

16.4 KiB

rp2040_uart/images/2024-01-03_uart-tx-20mb.png

13.9 KiB

rp2040_uart/images/2024-01-03_uart-tx-25mb.png

13.2 KiB

rp2040_uart/images/2024-01-03_uart-tx-2mb.png

17.1 KiB

rp2040_uart/images/2024-01-03_uart-tx-2p5mb.png

16.5 KiB

rp2040_uart/images/2024-01-03_uart-tx-30mb.png

13.5 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment