Switch BT1035 bring-up from Line-In to I2S slave (AT+AUXCFG=3, AT+I2SCFG=67) to match the ADAU1701 PCM routing, confirm 2 kΩ I2C pull-ups on R1/R16, and sync firmware docs, AGENTS rules, and the DATASHEET bundle. Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
---
|
||
description: Chip driver rules (Si4684, ADAU1701, FSC-BT1035)
|
||
globs: **/*Driver.*, **/drivers/**, **/*Adau*, **/*Si4684*, **/*Bt1035*
|
||
alwaysApply: false
|
||
---
|
||
|
||
# Chip drivers
|
||
|
||
Full spec: @AGENTS.md §7.1–7.3.
|
||
|
||
## Si4684 (DAB+/FM tuner)
|
||
- Boot flow POWER_UP -> load patch -> load image -> BOOT must follow the
|
||
AN649 sequence exactly; cite the section per step in a comment.
|
||
- Stream firmware images in bounded chunks from flash via an injected
|
||
`IFirmwareSource`; never load a whole image into a heap buffer.
|
||
- Opcodes/property IDs are `enum class`; validate the CTS/STATUS byte
|
||
before trusting any payload. Public API is intent-level; registers
|
||
are private. One driver owns one SPI/I2C handle via RAII.
|
||
|
||
## ADAU1701 (SigmaDSP, RAM boot, no EEPROM)
|
||
- ESP32 writes the SigmaStudio export to DSP RAM at every boot. Model the
|
||
export as an ordered list of RegisterWrite{address, bytes} parsed in
|
||
the pure core, replayed by the shell over I2C.
|
||
- EQ and mixer runtime changes use safeload (click-free). A raw param
|
||
write while audio runs is a bug.
|
||
- Typed control surfaces: setEqBand(EqBandIndex, GainDb, FrequencyHz, Q);
|
||
setInputMix(MixSource, GainDb) with enum class MixSource {Si4684,Esp32}.
|
||
- Biquad/gain math lives in the pure core with host tests vs reference.
|
||
|
||
## FSC-BT1035 (QCC3056, AT over UART)
|
||
- Typed command builder; explicit OK/ERROR/timeout parsing.
|
||
- AT+AUXCFG=3 and AT+I2SCFG=67 (I2S slave 48 kHz) are mandatory in the
|
||
init sequence and covered by host tests. Unknown responses are an error,
|
||
not ignored.
|