Skip to content

Conversation

@bifurcation
Copy link

Full-duplex I2S opeeration on these platforms requires "I2Sext" peripherals that work alongside the SPI/I2S peripherals. This PR attempts to add support for these peripherals, in support of enabling full-duplex operation at the embassy-stm32 layer.

I tried following the directions in the README, invoking ./d extract-all for I2S2ext and I2S3ext. This produced a few dozen YAML files, of which there were two unique classes modulo renaming of fields. I called these i2sext_v1.yaml for the F4 family and _v2.yaml for the F3 family (following release date order). I added lines to perimap.rs which ought to have caught the relevant peripherals.

However, I hit a roadblock here. The entries in PERIMAP never hit, apparently because the I2Sext peripherals don't appear in the chip XML in data/cubedb, from which the ChipGroup values are generated. Those XML files do contain the pin definitions that the ext-peripherals require (e.g., in STM32F405RGTx.xml, pin PB4 has I2S3_ext_SD).

I would appreciate guidance on how to move forward here. I suspect that the I2Sext peripherals might need special handling like the I2S peripherals, but this is exceeding the bounds of my knowledge here.

@embassy-ci
Copy link

embassy-ci bot commented Sep 24, 2025

@xoviat
Copy link
Contributor

xoviat commented Nov 27, 2025

You can add it to family extra

@Dirbaio
Copy link
Member

Dirbaio commented Nov 27, 2025

I don't think I2SExt is a "real" peripheral though? just a mode of i2s?

@xoviat
Copy link
Contributor

xoviat commented Nov 27, 2025

There may be extra registers here, not sure.

@bifurcation
Copy link
Author

Yes, there are different registers, and they are not usable as normal I2S peripherals. Worked example in this embassy PR:

https://github.com/embassy-rs/embassy/pull/4746/files#diff-b5769e91d65add7186b780b48d11fb3b3a8464dcd3fe105c2da8998841d99302R30

@xoviat
Copy link
Contributor

xoviat commented Nov 27, 2025

yeah, so just add the extra regs and refrence them in family/extra

@bifurcation
Copy link
Author

Only thing that gives me pause about that is that in the SVD files, the I2Sext peripherals are listed alongside the I2S peripherals, in the same format. Is there a way to coalesce registers from multiple peripherals?

@xoviat
Copy link
Contributor

xoviat commented Nov 27, 2025

Only the extra registers should be added in the i2s yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants