STM32G031J6

From Embedded Workshop
Jump to navigation Jump to search

In December, 2018, STMicro announced their STM32G0 line of microcontrollers. https://blog.st.com/stm32g0-mainstream-90-nm-mcu/
The STM32G031J6 is the first STM32 powered, 8pin micro, in their value line to compete with traditional 8-bit and 16-bit micros in the economy space.

Their value line:
https://www.st.com/en/microcontrollers-microprocessors/stm32g0x0-value-line.html

STM32G0 Discovery Kit STM32G0316-DISCO: ($10.53 from Digikey)
https://www.st.com/en/evaluation-tools/stm32g0316-disco.html
https://www.digikey.com/product-detail/en/stmicroelectronics/STM32G0316-DISCO/497-19570-ND/10321672
Data Brief: https://www.st.com/resource/en/data_brief/stm32g0316-disco.pdf

Digikey offers the STM32G031J6M6 for $1.43 (single quantity)
https://www.digikey.com/products/en/integrated-circuits-ics/embedded-microcontrollers/685?k=STM32G031J6

Digikey offers the STM32G030J6 for $0.40 when purchasing 2000 pcs.
https://www.digikey.com/products/en?keywords=STM32G030J6

STM32G0 Getting started - hardware development document:
https://www.st.com/resource/en/application_note/dm00443870-getting-started-with-stm32g0-series-hardware-development-stmicroelectronics.pdf

ST Website for the STM32G0 family: http://www.st.com/stm32g0
Product overview document, 117 pages: https://www.st.com/resource/en/datasheet/stm32g031j6.pdf

RM0444, STM32G0x1 advanced Arm®-based 32-bit MCUs, 1230 pages:
https://www.st.com/resource/en/reference_manual/dm00371828-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

STM32G0 Online Training:
https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-online-training/stm32g0-online-training.html

Software Tools

* STM32G0 - STM32CubeMX: https://st-onlinetraining.s3.amazonaws.com/STM32G0-Ecosystem_CubeMX_Tool/index.html
* STM32Cube G0 firmware package: https://st-onlinetraining.s3.amazonaws.com/STM32G0_Ecosystem_Firmware_drivers-%28FW%29/index.html
* https://www.st.com/en/embedded-software/stm32cube-mcu-mpu-packages.html

Keil MDK
Keil Pack installer: https://www.keil.com/dd2/st/stm32g031j6mx

Everything compiled and built well. Had a problem downloading: "Flash Download failed - Cortex - M0"
The issue is the lack of a programming method defined.
Project -> Options for Target xxx (Alt F7) -> Debug tab -> Use ST-Link Debugger -> Settings -> Flash Download ->
Add the STM32G0xx 32KB Flash algorithm with Address Range 080000000H - 08007FFFH.

The green LED, LD2, annode, connects to PA12, pin6, on the STM32G0 part. (Driving this pin high turns the LED on.)
The blue push-button, B1, connects T_NRST, pin 4 of the STM32G0 part, to ground when pressed.
(I'm guessing the T_NRST signal is re-assigned as a GPIO for this function.)

Adding an OLED display via I2C

0.96" OLED Display


Additional Websites / Notes:


C:\Users\Jim\Documents\STM32_Projects\STM32G0_Blinky