TX serial interface timing too slow at 500kHz #5
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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)
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: ISR body moved into main loop (ISR only reloads timer + sets tick flag). Timing is now independent of ISR overhead and works at 500kHz.