embassy-nrf: I2S range checking is incorrect for some chips
Author: datdenkiknietCreated Sep 2, 2026Updated Sep 2, 2026
I (with the help of an LLM) found two oddities in the I2S range checking:
- The
I2S.RXTXD.MAXCNTregister represents 32-bit words on chips like thenrf52833, but it represents bytes on chips like thenrfl54l10. This means that only a quarter of the transmission is sent/received on some parts. I2S.RXTXDgenerally has a maximum value less than0xFF_FF(e.g.nrf52833supports0x3F_FF), but the calculation compares the value that will end up beingRXTXDtoEASY_DMA_SIZEwhich is0xFF_FFon most chips that support I2S.
Source: embassy-rs/embassy