On Wed, Apr 15, 2020 at 4:08 PM Gregory Nutt <spudan...@gmail.com> wrote: > This document address migration from F1 to F3 and addresses all major > differences between F1 and F3: AN4228, Application note, Migrating from > STM32F1 Series to STM32F3 Series microcontrollers. Table 6 address every > peripheral.
Ok, I'll look at that. Meanwhile... So I've been studying, toward making a decision, whether to try implementing this in the stm32 directory or create a new one for stm32g4... I probably won't know which is better and which is less (or more!) work until I actually start writing code. As I'm looking at STM32F3 parts we support and compare to STM32G474, it seems the STM32F334 has the most similarities to this new part. Comparison: (At least what I know so far...) Both have GPIO ports ABCF. STM32G474CxT adds port G but only for PG10-NRST. That is, the reset pin can be used as a GPIO. Analog: the STM32G474Cxt is heavy on analog features with much more ADC, DAC, COMP, and OPAMP peripherals and pins than the STM32F3. These features are obviously new IP as the ADC adds Hardware Oversampling, IO Voltage Booster, Gain Compensation, Bulb Sampling, Sampling Time Control Trigger, Dual Interleaved Sampling, new Analog Watchdog features. The DAC adds Sample and Hold, and also Internal DACs that can be connected to other internal peripherals, e.g., to a COMP or OPAMP. And there's much more. [1] Timers: Both have HRTIM, but the STM32F334 has HRTIM IP version 1.0 while STM32G474Cxt has HRTIM IP version 2.0. This adds various features and capabilities, described in [2]. Also, the G4 more of the regular resolution timers. Communication: STM32F334 has CAN. STM32G474CxT has FDCAN1, FDCAN2, FDCAN3. STM32G474CxT has LPTIM, LPUART, SAI, USB. Also, more I2C and SPI. Side-by-side comparison of Ports, Pins, and Peripherals: Ports: =============================== STM32G474CxTx | STM32F334CxTx =============================== PORT_A | PORT_A PORT_B | PORT_B PORT_C | PORT_C PORT_F | PORT_F PORT_G | - x - ------------------------------- Pins: =============================== STM32G474CxTx | STM32F334CxTx =============================== PA0 | PA0 PA1 | PA1 PA2 | PA2 PA3 | PA3 PA4 | PA4 PA5 | PA5 PA6 | PA6 PA7 | PA7 PA8 | PA8 PA9 | PA9 PA10 | PA10 PA11 | PA11 PA12 | PA12 PA13 | PA13 PA14 | PA14 PA15 | PA15 ------------------------------- PB0 | PB0 PB1 | PB1 PB2 | PB2 PB3 | PB3 PB4 | PB4 PB5 | PB5 PB6 | PB6 PB7 | PB7 PB8-BOOT0 | PB8 PB9 | PB9 PB10 | PB10 PB11 | PB11 PB12 | PB12 PB13 | PB13 PB14 | PB14 PB15 | PB15 ------------------------------- PC13 | PC13 PC14-OSC32_IN | PC14-OSC32_IN PC15-OSC32_OUT | PC15-OSC32_OUT ------------------------------- PF0-OSC_IN | PF0-OSC_IN PF1-OSC_OUT | PF1-OSC_OUT ------------------------------- PG10-NRST | - x - ------------------------------- Peripherals: =============================== STM32G474CxTx | STM32F334CxTx =============================== ADC1 | ADC1 ADC2 | ADC2 ADC3 | - x - ADC4 | - x - ADC5 | - x - - x - | CAN COMP1 | - x - COMP2 | COMP2 COMP3 | - x - COMP4 | COMP4 COMP5 | - x - COMP6 | COMP6 COMP7 | - x - CRS | - x - DAC1 | DAC1 DAC2 | DAC2 DAC3 | - x - DAC4 | - x - FDCAN1 | - x - FDCAN2 | - x - FDCAN3 | - x - HRTIM1 | HRTIM1 I2C1 | I2C1 I2C2 | - x - I2C3 | - x - I2C4 | - x - I2S | - x - I2S2 | - x - I2S3 | - x - IR | IR LPTIM1 | - x - LPUART1 | - x - OPAMP1 | - x - OPAMP2 | OPAMP2 OPAMP3 | - x - OPAMP4 | - x - OPAMP5 | - x - OPAMP6 | - x - QUADSPI1 | - x - RCC | RCC RTC | RTC SAI1 | - x - SPI1 | SPI1 SPI2 | - x - SPI3 | - x - SYS | SYS TIM1 | TIM1 TIM15 | TIM15 TIM16 | TIM16 TIM17 | TIM17 TIM2 | TIM2 TIM20 | - x - TIM3 | TIM3 TIM4 | - x - TIM5 | - x - TIM8 | - x - - x - | TSC UCPD1 | - x - USART1 | USART1 USART2 | USART2 USART3 | USART3 USB | - x - ------------------------------- References: [1] STM32F3 vs STM32G4 Analog: AN5310: https://www.st.com/content/ccc/resource/technical/document/application_note/group1/0e/97/a6/8e/6b/bd/49/40/DM00607955/files/DM00607955.pdf/jcr:content/translations/en.DM00607955.pdf [2] HRTIM differences: AN4539 Rev4, page 7, and Appendices: https://www.st.com/content/ccc/resource/technical/document/application_note/13/d6/48/9d/11/11/4c/08/DM00121475.pdf/files/DM00121475.pdf/jcr:content/translations/en.DM00121475.pdf Cheers, Nathan