On Tue, Apr 14, 2020 at 7:57 PM Gregory Nutt <spudan...@gmail.com> wrote:
> > > So this sounds like a new stm32g4 subdirectory would be beneficial. > > You would have to know how pervasive the differences between the chips > are. The STM32F0 cohabitates quite nicely with G0 and L0, for example. > > If, for example, all of the peripherals are the same, but there is a > difference in clocking or power management (which would be my > suspicion), then those could be handled with separate .c file selected > in the Make.defs file. > > You don't want to clutter the code, but neither do you want to duplicate > all of the drivers. The first is ugly and effects usability; the second > could be a LOT of work. You can't make that decision without > understanding the differences and making some trade-off (even if it is > still mostly subjective). Thanks for your thoughts. In reading about the STM32G4 family, someplace on the STmicro website, this introductory page: https://www.st.com/en/microcontrollers-microprocessors/stm32g4-series.html suggests that there's a "high degree of compatibility" with the stm32f3 series. I opened the datasheet for one of the stm32f3 parts we support side-by-side with a datasheet for one of the stm32g4, and just scrolling through them, it seems the g4 has a lot more in terms of peripherals, including a high resolution timer (HRTIM), more analog, more communication, various math accelerators... It's certainly an important question whether to create a whole new directory or build this support into the stm32 directory. On the one hand, I don't like to have the code duplication of yet another stm32 directory if I can avoid it. Bottom line, you're right: I really need to understand both families and see how different they are. Looks like I have a lot of homework.... Nathan