HK Aura STM32 DeepWiki App 100% (1,404) • BL 531/562
Harman Kardon Aura (1st-Gen) • STM32F105xC • IAR EWARM • Live Ghidra Sync

STM32 Firmware Architecture DeepWiki

Complete reverse-engineered architectural reference for both STM32F105xC Flash images — the 48 KiB factory bootloader (stm32_bootloader.bin @ 0x08000000) and the 201 KiB main application (seg1.bin @ 0x0800C000) coordinating the AK7742 audio DSP, BridgeCo DM870-CE2 Wi-Fi/AirPlay module, RN52 Bluetooth module, capacitive touch/LED ring, and USB Host + FAT32 stack.

1,404 / 1,404
App Functions Named (100%) + 754 Labels
531 / 562
Bootloader Funcs + 634 Labels
256 KiB
48K BL + 201K App + 4K Config Flash
6 Tasks
Cooperative Mailbox Scheduler

01 System Architecture Overview

The Harman Kardon Aura 1st-generation speaker is a three-processor embedded system packaged in a single HUI firmware container (5,093,444 bytes). The STM32F105xC (ARM Cortex-M3, 72 MHz, Connectivity Line) acts as the central system controller: it boots from the 48 KiB factory bootloader at 0x08000000 into the main application (seg1.bin) at 0x0800C000, owns all user I/O, power states, audio routing, and orchestrates two companion wireless modules plus a dedicated audio DSP.

STM32F105xC (Cortex-M3) BL 0x08000000 • App 0x0800C000 • 6-Task Cooperative Event Loop • HCC USB Host (UAC1/HID/MSC) + FAT32 • LAC / FireCast / HTTP-MM / HarmanSpp • TIM3 1ms Soft-Timers + IAR dlmalloc BridgeCo DM870-CE2 8 MiB NOR • BL1 + AirPlay App AirPlay • DLNA • Spotify • AP Telnet :8000 • HTTP-MM :10025 Roving Networks RN52 CSR BlueCore • Bluetooth A2DP • AVRCP • SPP • MFi iAP AT Cmds + CSR BCSP-DFU AK7742 Audio DSP + S/PDIF I2C2 (0x30) + Bit-Bang SPI (PC4) 2ch ADC • 4ch DAC • 48k/96k PRAM 31-step Vol • 9-step Bass • Amp/HP Mute USB OTG_FS Host Port 0x50000000 • IRQ 67 USB Flash (HK_AURA.bin) • iPod UAC1/HID Touch Panel & 30-LED Ring I2C1 (0xDA) • Soft-I2C (0xEA) Cap Touch Keys + Volume Slider 30-LED Dome Ring + Wi-Fi Status LED SPI + LAC UART4 115k I2C2 + SPI2/I2S2 I2C1 + Soft-I2C I2S Audio
Figure 1 — Harman Kardon Aura hardware & bus topology centered on STM32F105xC

Application Codebase Composition (1,404 Functions in seg1.bin)

USB Host Stack
244
STM32 HAL & IRQs
198
Wi-Fi & DM870
191
Application & Utils
188
Bluetooth & iAP
182
Audio & AK7742 DSP
105
FAT32 / VFAT
99
IAR Runtime & libc
77
Core & Scheduler
59
UI, Touch & LEDs
42
XML Parser
19

02 Hardware Platform & Memory Map

The MCU is an STM32F105xC Connectivity Line device (256 KiB Flash, 64 KiB SRAM, USB OTG_FS, dual I2S PLLs via RCC_CFGR2, 68 external IRQs). Both bootloader and application were compiled with IAR EWARM using Thumb-2 instructions, LZ77-compressed .data initialization (__iar_lz77_init3 at 0x08038b44), and a 16 KiB static dlmalloc heap.

RegionAddress RangeSizeContents & Notes
Factory Bootloader0x08000000 – 0x0800BFFF48 KiBstm32_bootloader.bin (562 funcs, 634 labels). ST USBH MSC + ChaN FatFs USB HK_AURA.bin flasher.
App Vector Table0x0800C000 – 0x0800C14F336 BInitial SP 0x2000FDC8, Reset 0x0803DCB1, 68 STM32F105 external IRQs.
App Code & RODATA0x0800C150 – 0x0803E3D3~201 KiBAll 1,404 functions, AK7742 48k/96k DSP programs, RN52 AT table, region string CountryCodeUS @ 0x0803E2C3.
Persistent Config Flash0x0803F000 – 0x0803FFFF4 KiBBoot/upgrade status word (1 = MCU upgrade requested), persisted volume/bass/EQ, 8-byte FireCast data, BT/Wi-Fi settings.
Static SRAM (.data/.bss)0x20000000 – 0x2000B8C7~46.2 KiBAK7742 coef RAM, HID instance (0x2000081C), USB DMA pool (0x20005160), FAT slots, CLI table, PCM ring buffers.
dlmalloc Dynamic Heap0x2000B8C8 – 0x2000F8C716 KiBReturned by dlmalloc_get_initial_heap (0x0802e82c); serves XML parser, HTTP-MM, and 0x2C00 audio ring pool.
Main Stack (MSP)0x2000F8C8 – 0x2000FDC8~1.25 KiBTop of stack initialized from vector[0] = 0x2000FDC8.

Key Peripheral & GPIO Assignments

PeripheralBase AddressConnected Hardware & Function
USART20x40004400115200 baud debug log & 48-command interactive serial CLI (g_debug_cli_table @ 0x20006970)
UART40x40004C00115200 baud RN52 Bluetooth module (PC10/PC11, reset/control PC12) — AT cmds, SPP, iAP, BCSP-DFU
I2C10x40005400Top capacitive touch controller @ 8-bit addr 0xDA (reg 7 keys/slider, reg 9 Wi-Fi LED)
I2C20x40005800AK7742 audio DSP @ 8-bit addr 0x30 (40 kHz polling master driver, PB10/PB11)
SPI2 / I2S20x40003800USB iPod digital PCM output fed by DMA1_Channel5 (0x40020058, IRQ 15)
Soft-I2CGPIO bit-bang30-LED dome ring driver @ 8-bit addr 0xEA (register maps at 0x200006DC / 0x200006FC)
Bit-bang SPIGPIOC4 CSS/PDIF optical receiver (AK4113/AK4114-class) register read/write & sample-rate detection
USB OTG_FS0x50000000Full-speed Host mode (IRQ 67) for USB flash drives (FAT32) and Apple iPod UAC1/HID
TIM2 / TIM3 / TIM70x40000000..1400TIM3: 1 ms system soft-timer & button hold tick. TIM2/TIM7: USB iPod audio SOF sync
GPIOA / B / C / D0x40010800..1400PA0 Opt sense, PA1 Aux sense, PA5 Amp mute, PA6 Route sel, PA8 Power wake, PB2 AK7742 reset, PB14 HP amp en, PB15 HP sense, PC6/7/8 audio mux, PD2 DM870 reset

03 STM32 Factory Bootloader (stm32_bootloader.bin, 48 KiB)

Residing at 0x08000000..0x0800BFFF (562 functions, 531 named, 634 labels in Ghidra), the STM32 factory bootloader is an independent IAR EWARM image that runs on every reset before jumping to seg1.bin at 0x0800C000.

Boot Decision & Handoff 0x0803F000

Checks the upgrade flag in persistent config Flash (0x0803F000) and validates the main application vector table at 0x0800C000. On normal boot, relocates SCB->VTOR = 0x0800C000, sets MSP, and jumps to seg1.bin Reset_Handler.

ST USBH MSC + ChaN FatFs USB Flash

Unlike the app's HCC stack, the bootloader uses ST's STM32_USB_OTG_Driver + USBH_MSC + ChaN FatFs (f_mount, f_open, f_read) to mount USB drives and read HK_AURA.bin.

HUI Container & Flash Programming Segment 1

Parses the HUI header, validates the 32-bit two's-complement checksum of Segment 1, unlocks STM32 Flash (FLASH_KEYR), erases pages 0x0800C000..0x0803EFFF, programs half-words, and clears the upgrade flag.

IAR DLib & LED Ring Status USART2 + 0xEA

Includes full IAR DLib _PrintfFull (0x08001320) logging over USART2 and drives the 30-LED ring over soft-I2C 0xEA to display flashing progress and failure states.

04 Application Boot & Cooperative Scheduler

There is no preemptive RTOS. After Reset_Handler (0x0803DCB0) runs IAR C runtime initialization (__iar_lz77_init3 decompressing .data and zeroing .bss), main() configures clocks (72 MHz HSE PLL), SysTick (10 ms tick counter g_systick_10ms_ticks), TIM3 (1 ms soft-timers), peripherals, and enters a deterministic super-loop dispatching 6 cooperative tasks connected via a lightweight event mailbox (g_task_event_masks @ 0x20008EEC, g_task_mailbox_slots @ 0x2000B6D4).

Task 1 — DSP, Audio & Flash Audio Core

Owns AK7742 initialization, 48k/96k program switching, source routing (Aux/BT/Opt/Wi-Fi/iPod), volume/bass/EQ curves, amp/headphone mute timing, and persistent Flash config writes.

Task 2 — System & Power Manager Supervisor

Coordinates power-on/standby/deep-sleep (WFI waking on PA8), auto-standby timers, factory reset (0x32), bypass mode (0x6E), and cross-subsystem event orchestration.

Task 3 — 30-LED Ring Controller Visual UI

Drives the 30-LED dome ring over soft-I2C 0xEA: volume/bass bar animations, clockwise Wi-Fi share sweep, upgrade spinner (2-LED rotating pair), and failure solid/blink states.

Task 4 — USB Upgrade & Button Events HUI / Input

Handles Power+Wi-Fi upgrade trigger (0x31), mounts USB flash via HCC FAT32, validates HK_AURA.bin, and sequences MCU/DM870/RN52 firmware updates.

Task 5 — Wi-Fi / DM870 / autosc.sp Network

Manages BridgeCo DM870-CE2 lifecycle over SPI/LAC, Wi-Fi AP/STA transitions, targeted/full scans, FireCast notifications, HTTP-MM XML remote control, and XMODEM segment-2 upgrades.

Task 6 — Bluetooth RN52 & iAP BT / MFi

Runs the RN52 ASCII AT state machine over UART4, dispatches HarmanSpp binary commands, handles Apple MFi/iAP authentication & Wi-Fi sharing, and executes CSR BCSP-DFU.

05 Audio Pipeline & AK7742 DSP

Every audio source passes through the Asahi Kasei AK7742 DSP (I2C2 address 0x30), integrating a 2-channel ADC (analog Aux), digital I2S/PCM inputs (DM870 Wi-Fi, RN52 Bluetooth, S/PDIF optical receiver, and STM32 SPI2/I2S2 USB iPod audio), and a 4-channel DAC feeding the woofer/tweeter power amp (mute GPIOA5) and headphone amp (enable GPIOB14, sense GPIOB15).

  • Dual DSP Programs: Variant 0 (g_ak7742_prog_v0_48k @ 0x0803694C, 3,837 B + 0x16E coefs) runs for 44.1/48 kHz sources with 5 selectable bass filter sets. Variant 1 (g_ak7742_prog_v1_96k @ 0x0803784C, 3,562 B) loads automatically for 88.2/96 kHz optical S/PDIF streams.
  • Volume & Bass Tables: 31-step master volume table (0x0000..0x2000, coeff 0x04) and 9-step bass table (coeff 0xA4).
  • USB iPod Digital Audio: Captured via HCC UAC1 ISO IN (0x0802fbca) into a 100-slot PCM ring buffer, tracking clock drift via OTG_FS->HFIR, and streamed out via DMA1_Channel5 to SPI2/I2S2 (0x08030128).

06 Wi-Fi, BridgeCo DM870 & Network Protocols

AirPlay, DLNA, Spotify Connect, and the Setup AP (HK_Aura***** @ 192.168.1.1) run on the BridgeCo DM870-CE2 (AirPlay App Wiki • Bootloader L1 Wiki). The STM32 communicates with it over SPI via BridgeCo's LAC protocol (g_lac_rx_buf @ 0x2000A2A0).

BridgeCo LAC Layer SPI Transport

Bidirectional register/command packets carrying Wi-Fi state, sub-source (1=DLNA, 2=AirPlay, 3=Spotify), scan results, and AP/STA provisioning.

HTTP-MM XML Remote (Port 10025) LAN Control

HK Remote app XML commands (query-status, set_system_volume) parsed by the 19-function XML parser.

FireCast Protocol Binary Control

firecast_handle_command (0x0800daa8): LED ring control (cmd 0x0A), unsolicited status notifications, and 8-byte persistent private data.

Region Country Code 0x0803E2CE

g_region_country_code defaults to US (ch 1–11) and can be patched to EU (ch 1–13) or JP (ch 1–14) with segment-1 checksum recalculation.

07 Bluetooth (RN52), HarmanSpp & Apple MFi iAP

The Roving Networks RN52 (CSR BlueCore) connects over UART4 (115200 baud). Task 6 drives an ASCII AT state machine (g_rn52_at_cmd_table @ 0x08017958) and the HarmanSpp big-endian binary command dispatcher (0x08019816):

Command IDMeaningCommand IDMeaning
0x0001Query device capability0x0401 / 0x0403Get / set device name
0x0101 / 0x0103Get / set EQ index0x0601Query firmware version
0x0201 / 0x0203 / 0x0204Query / set volume & mute0x0802 / 0x0B01 / 0x0B03Key event / power status & off
0x0301Scan wireless networks0x0C01 / 0x0D02 / 0x0D04Series ID / EQ & bass
0x0304 / 0x0305 / 0x0307Join Wi-Fi / query IP / net count0x0E01 / 0x0E03Get / set audio source
0x5304Targeted SSID Wi-Fi ShareotherLogs Unknown Spp Cmd, returns 0x63

08 HCC USB Host Stack & FAT32 Filesystem

Nearly 25% of seg1.bin (343 functions) is an HCC Embedded bare-metal USB Host + FAT12/16/32 stack on OTG_FS (0x50000000, IRQ 67): HCD core, UAC1 ISO audio (39 funcs), USB HID + Report Descriptor parser (29 funcs) for Apple iPod iAP, and MSC BOT + SCSI + VFAT LFN (124 funcs).

09 UI, Capacitive Touch & 30-LED Ring

Key MaskButtonsTriggerAction / Event
0x01PowerHeld 2.2 s / 5.0 sShort power down (0x1F) / Long power down (0x21)
0x02Wi-FiTap / 2.2 s / 5.0 sWi-Fi status (0x22) / Setup AP (0x23) / Long Wi-Fi (0x24)
0x03Power + Wi-FiHeld 2.2 sUSB Firmware Upgrade (btnSendUpgradeDownFun → event 0x31)
0x11Power + SourceHeld 2.2 sFactory reset / load defaults (0x32)
0x12Wi-Fi + SourceHeld 2.2 sEnter bypass mode (0x6E)
0x10SourceTap / Held 2.2 sCycle source (0x6C) / Bluetooth pairing (0x6D)
0x08 / 0x04 / 0x0CVol+ / Vol- / BothPress / RepeatVolume up/down (0x2B / 0x2C) & mute

10 Multi-Target Firmware Upgrade Pipelines

Holding Power + Wi-Fi for 2.2 s (or running serial CLI upgrade) mounts FAT32 USB flash, opens HK_AURA.bin, parses the HUI header, verifies 32-bit checksums, and updates up to three targets: 1. DM870 Seg 2 via 133-byte XMODEM-CRC over SPI, 2. RN52 Bluetooth via CSR BCSP-DFU over UART4 (U-DONT*KNOW handshake), and 3. STM32 MCU Seg 1 by writing status 1 to 0x0803F000 and rebooting into the 48 KiB factory bootloader.

11 Interactive STM32 Function & Symbol Explorer

Browse all currently annotated Ghidra objects from both seg1.bin (1,404 functions, 754 labels) and stm32_bootloader.bin (562 functions, 634 labels). Press / anywhere to focus search.

Loading...
Address Symbol Name Subsystem Description