Skip to content

Significant update - bug fixes and robustness improvements - #22

Draft
sp5wwp wants to merge 15 commits into
OpenRTX:mainfrom
sp5wwp:main
Draft

sp5wwp wants to merge 15 commits into
OpenRTX:mainfrom
sp5wwp:main

Conversation

@sp5wwp

@sp5wwp sp5wwp commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Hardware

  • RXEN (P10) fix. PMC1 cleared the wrong bit (P11 instead of P10), so RXEN stayed an
    analog input and never drove the RX LNA (Q2) supply. Its polarity was also inverted. RXEN is
    now high in RX and low in TX, which should noticeably improve RX sensitivity.

Firmware

  • Initialize the RX ring buffer before enabling the UART receive interrupt.
  • AT+TURBO: wait for TSF as well as BFF so the final OK\r\n is fully sent before the baud rate changes.
  • AT+TURBO replies ERR on R5R0C002, where it is not implemented.
  • Ring buffer pointers and data are volatile, since they are shared with the RX ISR.
  • I²C ACK is now checked: PEEK/POKE reply ERR when the transceiver does not respond,
    and PTT handling never writes register 0x30 from a failed read.
  • New AT+TOT=<seconds> transmit timeout (default 180 s, 0 disables), on a 1 Hz TAU0 tick.
    A held PTT must be released before it can key again.
  • Stricter number parsing: rejects empty values, overflow above 65535, and embedded spaces.
    AMP/AUDIO accept only 0 or 1.
  • Non-blocking command reception: PTT and the timeout are serviced while a command is partly
    received, and an overlong line gets a single ERR.

Python API

  • poke() always returned False. ERR replies and timeouts now raise SA8x8Error.
  • NotImplemented changed to NotImplementedError, serial timeout added, integer frequency math,
    and new amp(), audio() and tot() helpers.

CI

  • Actions updated to Node 24, Apptainer installed directly, workflow_dispatch added.

Testing

CI builds all RL78 targets cleanly. The command parser and Python API were tested on the host
against the real firmware loop. Still needs hardware verification: RXEN levels and RX
sensitivity, the AT+TOT timer, and the AT+TURBO handover. R5R0C002 changes are syntax-checked only.

sp5wwp and others added 13 commits October 8, 2026 19:37
- fixed a typo in the comment
- reversed polarity of the RXEN signal (should be high for RX)
- MCU pin connected to the RXEN line is no longer hi-z
Replaced setup action with manual installation of Apptainer.
- the timeout is 180 seconds by default
- parsing starts at `s[*pos]` and stops at the first non-digit character
- the value has to fit in 16 bits
@silseva
silseva requested a review from edgetriggered October 8, 2026 18:53
@smeegle5000

Copy link
Copy Markdown

in several attempts to run this branch it appears that something in this code is breaking the communications path or locking up the module, i am unable to get any response from it, building the previous version from source using the same process yields a working binary that does respond to commands

@sp5wwp

sp5wwp commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Should be fixed now.

@edgetriggered
edgetriggered marked this pull request as draft October 25, 2026 17:17
@edgetriggered edgetriggered self-assigned this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants