P1: USART6 TX output truncated — strings arrive with leading nulls #522

Closed
opened 2026-03-06 22:36:02 -05:00 by seb · 0 comments
Owner

Problem

USART6 (Jetson Orin link @ 921600 baud) output strings arrive truncated. Pattern: 24 null bytes followed by only the tail of the message.

Examples:

  • Boot banner: only OK\n visible instead of SALTYLAB USART6 OK\n
  • Status query: hb=0 instead of ST cal=0 estop=0 pitch=? hb=0
  • ESC debug: r=0 instead of ESC tx=1 rc=0 spd=0 str=0

Suspected cause

  • HAL_UART_Transmit overlap — multiple callers transmitting on huart6 concurrently
  • No mutex/lock on USART6 TX
  • ESC debug output fires every 50th send (~1Hz) competing with command responses

Fix

  • Add a TX mutex or use a ring buffer for USART6 output
  • Or switch to DMA-based TX with a queue
  • Guard concurrent transmits with a busy flag
## Problem USART6 (Jetson Orin link @ 921600 baud) output strings arrive truncated. Pattern: 24 null bytes followed by only the tail of the message. Examples: - Boot banner: only `OK\n` visible instead of `SALTYLAB USART6 OK\n` - Status query: `hb=0` instead of `ST cal=0 estop=0 pitch=? hb=0` - ESC debug: `r=0` instead of `ESC tx=1 rc=0 spd=0 str=0` ## Suspected cause - `HAL_UART_Transmit` overlap — multiple callers transmitting on huart6 concurrently - No mutex/lock on USART6 TX - ESC debug output fires every 50th send (~1Hz) competing with command responses ## Fix - Add a TX mutex or use a ring buffer for USART6 output - Or switch to DMA-based TX with a queue - Guard concurrent transmits with a busy flag
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#522
No description provided.