USART1 IDLE interrupt (DMA circular RX) was calling HAL_UART_IRQHandler mid-frame during polling HAL_UART_Transmit, resetting gState and causing leading nulls / truncated frames on the Jetson telemetry link at 921600 baud. Fix: introduce jlink_tx_locked() which disables USART1_IRQn around every blocking HAL_UART_Transmit call, preventing IRQHandler from corrupting gState while the TX loop is running. A s_tx_busy flag drops any re-entrant caller (ESC debug, future USART6/VESC paths). Both jlink_send_telemetry (50 Hz) and jlink_send_power_telemetry (1 Hz) now use jlink_tx_locked(). Also correct the stale config.h comment that misidentified the Jetson link as USART6 (it moved to USART1 in Issue #120). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
SaltyLab self-balancing bot firmware (STM32F722)
Languages
Python
67.1%
C
11.4%
JavaScript
9.2%
OpenSCAD
7.8%
HTML
1.5%
Other
2.9%