Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

STM32H7B0VB Using I2S on SPI6 with BDMA2 causes panic. #3863

Open
evaneidt opened this issue Feb 9, 2025 · 0 comments
Open

STM32H7B0VB Using I2S on SPI6 with BDMA2 causes panic. #3863

evaneidt opened this issue Feb 9, 2025 · 0 comments

Comments

@evaneidt
Copy link

evaneidt commented Feb 9, 2025

When initializing I2S on peripheral SPI6 only supports DMA channels BDMA2_CH(0-7). Configuring the I2S peripheral through new_rxonly() causes a panic in dma mod.rs:97 with error "index out of bounds: the len is 24 but the index is 24". It appears this line is attempting to read the DMA_CHANNELS array that is generated by embassy_stm32. This is reached when i2s.rs is configuring the RX dma buffer.

In embassy-stm32 build.rs the comment on line 1624 ("// Some H7 chips have BDMA1 hardcoded for DFSDM, ie no DMAMUX. It's unsupported, skip it.") could be showing the issue. It appears as if the channel count is being undercounted as a result of this skipping, leading to the invalid index. Possibly this skipping is no longer needed (array length is shorter than it should be), or some other part of the code should be doing this skipping that isn't (index is longer than it should be).

I am unfortunately unfamiliar with this codebase and too inexperienced with Rust as a whole to suggest how this might be fixed, but I believe this to be the root cause.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant