-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Describe the bug
A parity error due to sporadic glitch causes the firmware update to fail - even though communication has retry attempts included.
To Reproduce
Steps to reproduce the behavior:
- Go to https://test.webpbrick.com/firmware/index.html
- Open web developer JavaScript console for details
- Connect via serial and start fw download
- See the fw download fail
Expected behavior
Sporadic glitches only cause retry attempts of communication but no complete failure.
Screenshots
Operating system & webbrowser:
- OS: Microsoft Windows 10 Pro
- Browser: Chrome Version 143.0.7499.148 (Offizieller Build) (64-Bit)
- Version: current test, commit hash see screenshot
RCX hardware & firmware:
- RCX hardware version: 1.0 (serial 628154)
- RCX firmware version: n/a
- IR tower: LEGO Serial IR Tower + USB/serial adapter
Additional context
I'll add the logic analyzer trace here.
[RXM] 0x00 0xFF for the response of downloading block #170 is unexpected. This must be caused by the sporadic glitch shown in the logic analyzer trace.
The re-transmission of the block... or rather the command 0x10 before the retry unveils a "parity error", i.e. the UART RX mechanism claims that the received block is invalid regarding the parity bit. All 10 further attempts to download the same firmware block fail with more "paritiy errors". The glitch probably introduces the reception of an invalid UART frame and keeps the UART receiver in an invalid state where it cannot recover from. Let's re-connect the serial device (in this case the USB/serial converter) and hope that this will recover to a sane state where it can continue TX/RX... and retry downloading the block.