This release is a point release because unknown/stale submodule(s)
caused a regression with long UART TX strings that subsequently could
not be reproduced.
The build artifacts for this release were compiled on a Raspberry Pi 5
running Raspberry Pi OS (Debian 12) instead of Ubuntu 22.04 on amd64.
The Pi 5 bootloader will leave devices it doesn't care about in the
Addressed state, so tud_mount_cb never gets called. Handoff from the
bootloader to Linux causes a suspend event followed by Reset.
Check if the interface association was configured on entry to Suspend or
Resume. Also, TinyUSB doesn't expose Bus Reset events for whatever
reason, so there's nothing that tears down the interface threads.
RP2040-E15 can also be triggered if a Debug Probe is connected to a
board with a floating ground. Typically this causes port ESD protection
to temporarily activate, meaning the Dp/Dm state gets corrupted. If this
happens in the middle of a handshake packet, the SIE can lock up.
The only way to detect this case is if SOF_RD stops advancing without a
corresponding suspend interrupt - so add a watchdog thread that forces a
disconnect if the hardware stops reporting frame counts.
This is disruptive, but immediate notification that the probe broke is
preferable to silently failing until the next character is sent by the host.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
We can save more power by parking threads when suspended, and threads
should be deleted when disconnected.
Also fix an inefficiency in usb_thread wakeups when the device is yet to
be configured, but is addressed - slowing down control transfers.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
tud_cdc_connected tests dtr, not rts - so we should do the same.
Don't unconditionally wake the uart thread when set_line_coding happens
- Windows frequently calls this after every linestate change, including
device close.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
- Update CMSIS to 5.7.0
- Update FreeRTOS to downstream commit aa52f214d
Note: for an existing repository clone, you must run
git submodule update --init
and delete and regenerate your build/ directory.
Software typically asserts line break for an extended period
(e.g. PuTTY will assert continuously until the next keypress), so
provide feedback via the LED.
Also declare variables used in both tinyusb callback and uart_thread context
as volatile.
For high data rate applications it's desirable to use hardware flow control
to prevent characters getting dropped when faced with the vagaries of RTOS
and kernel latencies. Adding PROBE_UART_HWFC enables the UART's CTS/RTS pins,
and SET_LINE_STATE messages no longer affect the RTS pin.
* Fix up target reset functionality.
- Correct GPIO direction logic error in `probe_assert_reset`
- Remember to de-assert nRESET on deinit
* board_pico_config: use pin 1 for reset
This pin is normally used for UART debug output, but that is
undocumented. Repurpose it as reset output.
Signed-off-by: Sean Cross <sean@xobs.io>
* main: move stdio_uart_init() before DAP_Setup()
When using GP1 as a reset line, this is necessary to overwrite the
stdio function call from reusing the pin as a debug output.
Signed-off-by: Sean Cross <sean@xobs.io>
---------
Signed-off-by: Sean Cross <sean@xobs.io>
Co-authored-by: Sean Cross <sean@xobs.io>
It's possible for the Windows CDC-ACM driver to ignore the IN endpoint
for long periods of time - multiple frames - if the host application
doesn't consume uart RX data. Boost buffer sizes to compensate.
Also prevent usb_thread from potentially being idle for a tick when
there's work to do.