-
Notifications
You must be signed in to change notification settings - Fork 946
Unable to get output from Raspberry Pi Pico on 0.25.0 #3126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Arsen6331 Is the following a solution?
|
I don't know what you mean by this. I am using the
Before update: tinygo version 0.24.0 linux/amd64 (using go version go1.19 and LLVM version 14.0.0)
Yes, but I'd like |
Do the following work?
And the following should be equivalent output to the previous version.
|
I'm using nonstandard UART pins, so I had to make a simple program instead of using package main
import (
"io"
"machine"
"time"
)
func main(){
err := machine.UART0.Configure(machine.UARTConfig{
BaudRate: 115200,
TX: machine.GP12,
RX: machine.GP13,
})
if err != nil {
panic(err)
}
for {
io.WriteString(machine.Serial, "Hello World")
time.Sleep(50*time.Millisecond)
}
} This program worked on 0.24.0, and 0.25.0 with |
I can use |
I have checked on Windows and Ubuntu20.04 and both work. Also try the following for USBCDC (/dev/ttyACMx).
Perhaps it is due to errata RP2040-E5. |
It could be the USB hub actually, I'll try connecting it directly to the computer and see if it works. |
It still doesn't work even if directly connected to the computer. I checked dmesg, and I seem to be having the same problem as #3012
|
I think I see where it goes wrong. In your code sample: package main
import (
"io"
"machine"
"time"
)
func main(){
err := machine.UART0.Configure(machine.UARTConfig{
BaudRate: 115200,
TX: machine.GP12,
RX: machine.GP13,
})
if err != nil {
panic(err)
}
for {
io.WriteString(machine.Serial, "Hello World")
time.Sleep(50*time.Millisecond)
}
} You configure I recommend changing the code like this: io.WriteString(machine.UART0, "Hello World") This way, you explicitly write to UART0. It will work regardless of the
With In summary: with the |
I know. That's what I am doing now. The problem was I didn't notice the I was just interested to know why USB-CDC wasn't working without the |
Huh, that's odd. Yes, that could be a bug. |
Hi There, Not sure if this is the same. On the pico i have a simple program that println's and blinks the LED When I plug it in I get this in dmesg (and no addition /dev/ttyACM - I already have an existing ttyACM0)
|
had exactly the same issue, resolved after changing the cable and rebooting as mass storage mode (bootsel), no idea why. |
It looks like everything has been resolved in this issue. Any objections to closing? |
Now closing, thanks everyone! |
In TinyGo 0.24.0, I used UART0 with a UART to USB adapter to get output on my computer. Once I updated to 0.25.0, that stopped working.
I looked in the changelog and saw that RP2040 now uses USB as the default serial device, so I tried using
/dev/ttyACM0
, which is the serial device that appears when I plug in my pico, and there was no output on that. No other serial ports appear.I then tried to set
machine.Serial
tomachine.UART0
, but it doesn't implementmachine.Serialer
, so that didn't work either.Currently, I've downgraded to 0.24.0 to see the output. How do I get the serial output in 0.25.0?
The text was updated successfully, but these errors were encountered: