Support us and view this ad

可选:点击以支持我们的网站

免费文章

1. Introduction: The Imperative for Broadcast Emergency Alerts in Automotive Modern vehicles are increasingly required to relay critical safety information – from emergency vehicle approach warnings (EVAW) to sudden hazard alerts – to nearby pedestrians, cyclists, and other road users. Traditional point-to-point Bluetooth (BR/EDR) or even Bluetooth Low Energy (LE) connection-oriented approaches suffer from unacceptable pairing latency and connection overhead in an emergency scenario. LE Audio, built upon the Bluetooth 5.2+ Core Specification, introduces the LE Isochronous Channel and the Broadcast Isochronous Stream (BIS), enabling a single audio source to transmit to an unlimited number of receivers without prior pairing. This article provides a technical deep-dive into implementing a low-latency, deterministic LE Audio Broadcast system for in-car emergency alerts using the Infineon AURIX TC3xx family of microcontrollers, focusing on the real-time constraints and resource limitations of an automotive embedded environment. 2. Core Technical Principle: The LE Audio Broadcast Architecture The foundation of our implementation is the LE Audio Broadcast Isochronous Stream (BIS). Unlike a Connection-Oriented Isochronous Stream (CIS), a BIS does not establish a connection. The broadcaster (our AURIX TC3xx) transmits audio data in predefined time slots, known as ISO Intervals. Each BIS consists of a sequence of BIS Events, and each event contains one or more Sub-Events. The key parameters are: SDU Interval (SDU_Interval): The time between consecutive audio frames. For a 16 kHz, 16-bit mono stream, this is typically 7.5 ms (120 samples). ISO Interval (ISO_Interval): The number of 1.25 ms slots between the start of consecutive BIS events. Must be an integer multiple of 1.25 ms. We will use 6 slots, yielding a 7.5 ms interval. BIS Count (BIS_Count): Number of parallel streams (e.g., 1 for mono, 2 for stereo). Sub-Event Count (Sub_Event_Count): Number of retransmission opportunities per event. A value of 3 provides robustness against interference. The packet format for a BIS is defined by the Bluetooth Core Specification Vol 6, Part D. The BIS Data PDU is encapsulated in a Link Layer (LL) packet. The critical fields for our implementation are: LL Header (2 bytes): - LLID (2 bits): 0b10 for BIS Data PDU - NESN/SN (2 bits): Reserved for broadcast - CI (2 bits): Codec Indicator (0b00 for LC3) - Length (10 bits): Length of the payload in bytes BIS Data PDU Payload (Max 251 bytes): - Frame_Packet (Variable): Contains the LC3 audio frame, optional SDU fragment, and timing information. - The Frame_Packet itself has a sub-header: - Framing (1 bit): 0 for unframed, 1 for framed. We use framed. - Frame_Number (1 bit): Toggles per SDU. - Packet_Status_Flag (1 bit): 0 for good data. - RFU (5 bits): Reserved. - SDU_Count (8 bits): Indicates the number of SDUs in this packet. - SDU_Length (16 bits): Length of the first SDU. - Audio Data (Variable): The LC3 codec data. Timing Diagram (Textual Description): The AURIX TC3xx HSM (Hardware Security Module) or a dedicated timer (e.g., GPT12) generates an interrupt every 7.5 ms (ISO_Interval). Upon interrupt: Fetch the next LC3-encoded audio frame from a pre-allocated ring buffer. Construct the BIS Data PDU including the LL Header and Frame_Packet. Schedule the packet for transmission in the next available BIS event slot via the Bluetooth LE radio (e.g., an external NXP 88W8987 or Infineon AIROC CYW55572 connected via SPI). The radio transmits the packet in the first Sub-Event. If an acknowledgment is not expected (broadcast), the radio may retransmit in subsequent Sub-Events within the same ISO_Interval. 3....

继续阅读完整内容

支持我们的网站,请点击查看下方广告

正在加载广告...