TX serial interface timing too slow at 500kHz #5

Closed
opened 2026-07-26 17:02:11 +00:00 by daru · 3 comments
Owner

tx_rw bit-bangs the TX module clock/data lines with NOP delays. At 500kHz, each instruction takes 8us. The TX module datasheet requires much faster edges (sub-5ns mentioned in commented-out tx_recover). TX may not register the signals at this speed.

Fix: consider running at higher clock during TX, or using hardware SPI if available.

tx_rw bit-bangs the TX module clock/data lines with NOP delays. At 500kHz, each instruction takes 8us. The TX module datasheet requires much faster edges (sub-5ns mentioned in commented-out tx_recover). TX may not register the signals at this speed. Fix: consider running at higher clock during TX, or using hardware SPI if available.
Author
Owner

Likely two issues documented here----one is a likely inefficiency in how we're talking to the TX chip, and the other is the fact that we can't run the tx recover command sequence as defined by the datasheet (pg 288)

Likely two issues documented here----one is a likely inefficiency in how we're talking to the TX chip, and the other is the fact that we can't run the tx recover command sequence as defined by the datasheet (pg 288)
Contributor

Fixed in PR #39: moved ISR body into main loop (ISR now only reloads timer + sets tick flag), so timing is independent of ISR overhead. Works at 500kHz now.

Fixed in PR #39: moved ISR body into main loop (ISR now only reloads timer + sets tick flag), so timing is independent of ISR overhead. Works at 500kHz now.
daru closed this issue 2026-08-03 04:05:06 +00:00
Contributor

Fixed in PR #39: ISR body moved into main loop (ISR only reloads timer + sets tick flag). Timing is now independent of ISR overhead and works at 500kHz.

Fixed in PR #39: ISR body moved into main loop (ISR only reloads timer + sets tick flag). Timing is now independent of ISR overhead and works at 500kHz.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daru/PICsense#5
No description provided.