rp2040, rp2350: board stops responding after tinygo flash and ignores the 1200 bps reset

Abierto
#6,036 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start by reading the qbs reproduction from linked issue #6037 and trace how its four programs are flashed and their serial output checked. The report does not identify a likely source file or explain what differs from successful banner-only flashes, so first compare those program behaviors and reproduce the failure. Done means identifying and fixing the cause so repeated flash and reset cycles succeed on the affected RP2040 and RP2350 boards.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Symptom

On the Pico 2 W, Pico 2 and Pico, a board sometimes stops working after tinygo flash. On the RP2350 boards it still enumerates as the TinyGo USB device, but it sends no serial output and ignores the 1200 bps reset, so the next tinygo flash fails with unable to locate any volume: [RP2350]. Holding BOOTSEL and replugging recovers it. On the RP2040 it once disappeared from USB completely, with no RPI-RP2 drive either.

This is on one Apple silicon MacBook, with two different USB-A to USB-C adapters. TinyGo is dev at a0798aff built with LLVM 23. I have not tried another computer or a Linux host, so I do not know if TinyGo, macOS or the boards are at fault.

How to reproduce

Use qbs from #6037 on a Pico 2 W. It flashes four small programs in turn and checks their serial output. Run it in a loop until it stops finding the board:

while go run ./tools/qbs -target pico2-w; do :; done

Each time I tried, a board failed within 1 to 6 runs, on all three boards. An Arduino Uno R4 WiFi passed the one full run I did.

Probably ruled out

  • The pico2-w target. Its image is byte identical to pico2.
  • The two recent USB serial commits 83ce7e39 and fed7ac03. It still failed with both reverted.
  • DTR and RTS on the host. Toggling them on a stuck board did nothing.
  • Stale EP0 state after a bus reset. A change that clears it did not help.
  • Idle time before the reset, and USB selective suspend. Cycles with gaps of 0.5 s and 10 s did not fail.
  • How tinygo flash is called, and the host serial library. Python and Go hosts both failed, and so did runs that did and did not pass -port.
  • The adapter and cable.

More than 150 flashes of images that only printed a banner never failed when tinygo flash found the port itself. I do not know what the test programs do differently.

Lenguaje dominante
Go
Estrellas
17.8k
Forks
1.1k
Merge medio
1 d 4 h
PR fusionados (30 d)
380

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tinygo-org/tinygo

Todos los issues de tinygo-org/tinygo

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.