-
Notifications
You must be signed in to change notification settings - Fork 179
Description
In the resulting generated pac at build/stm32-metapac/src/chips/stm32u535xx/pac.rs the register address of ADC12_COMMON is set to 0x4204_8308, but according to the reference manual (RM0456), page 146, and the fact that it should be master ADC base address + 0x300 according to page 1368, chapter 33.7.1 and 33.7.2. this should be 0x4204_8300. This value seems to stem from the downloaded sources at sources/headers/stm32u5XXxx.h
I couldn't understand why I was unable to enable vref/vbat/tempsensor in the ADC1 peripheral until I noticed this error. Manually setting the ADC12_COMMON address to the correct value fixed my issue.
This issue affects the main branch of embassy, effectively rendering the embassy-stm32::adc driver useless for the entire U5 family of chips until fixed.
I'm not sure how to make a pull request that would manually override this value as they come from fetched sources, so it would have to be a pull request directly to stm32-data-generated? But then again, that would be overwritten and forgotten the next time a new tag is generated. Please let me know what to do.