This week, I focused on researching the firmware and real-time software architecture for implementing ANC directly on the STM32. I studied digital feedforward ANC implementations using FxLMS and investigated how we can structure the processing around DMA-driven audio transfers and an RTOS. One of our main technical challenges is that commercial ANC is often implemented using dedicated hardware or DSP functionality, whereas our goal is to implement the adaptive cancellation algorithm ourselves in software. I therefore focused on the timing, buffering, computation, and scheduling requirements needed to keep the feedback loop operating in real time.
I also investigated the memory requirements of the ANC algorithm. We initially considered whether an external memory chip could allow us to maintain much longer audio histories, but decided against this direction because the ANC workload is fundamentally streaming and additional memory-access latency could work against the low-latency requirements of the cancellation loop. Instead, our current plan is to maintain small DMA buffers and only the recent sample histories required by the adaptive filters. This also makes the RTOS and DMA architecture especially important, since audio must continuously move through the processing pipeline without missing deadlines.
My firmware work is currently on schedule, although the software implementation will be one of the major technical risks of the project. Over the next week, I plan to begin implementing the RTOS-based firmware framework, DMA audio buffering, and the initial processing pipeline so that we can benchmark CPU utilization and latency before implementing the complete FxLMS algorithm.

