stm32-rs / stm32-device-signature

Device electronic signature 'driver' for STM32 microcontrollers
8 stars 7 forks source link

Add STM32H7 family #7

Closed AlyoshaVasilieva closed 3 years ago

AlyoshaVasilieva commented 3 years ago

All chips except 7A3/7B3/7B0 use the same addresses.

stm32h7 covers: RM0468 (723/733, 725/735, 730), RM0433 (742, 743/753, 750), and RM0399 (745/755, 747/757).

stm32h7bx covers: RM0455 (7A3/7B3, 7B0).

Open to suggestions on feature naming.

Tested on an STM32H750VBT6 and an STM32H743VIT6. Appears to work; the flash size is certainly reading correctly.

Additionally add .idea dir to gitignore since my IDE puts garbage files in there.

AlyoshaVasilieva commented 3 years ago

Names seem good enough; it's a shame ST don't have any nomenclature for the A/B parts but I couldn't find anything. The only other option I can think of is adding a bunch of duplicate features stm32h72x, stm32h73x, stm32h74x, and stm32h75x, and then using #[cfg(any(feature="stm32h72x", feature="stm32h73x", ...)]. Probably also add stm32h7ax at that point. It's a bit more of a pain for us but might be a bit less confusing, what do you think?

I'm not a huge fan of multiple features leading to the same implementation, since it might make a user believe there is an underlying difference here. Not a strong opinion though, I'll switch to that definition method if you'd prefer it. (edit: Though a dupe feature for the A/B parts makes sense, due to the lack of a properly common name)

adamgreig commented 3 years ago

Having another feature for stm32h7ax and then using stm32h7 for the rest sounds good to me!

Disasm commented 3 years ago

Thank you for the PR! I'd better use Adam's naming suggestion with duplicate features. A single stm32h7 feature that covers some of the subfamilies is confusing and doesn't look like a good idea. Also we already have specific subfamily features for F7 (stm32f72x and stm32f73x).

Disasm commented 3 years ago

Released in v0.3.2 :tada: