MicroPython on STM32F407G-DISC1

From Embedded Workshop
Revision as of 11:09, 24 April 2021 by JMerkle (talk | contribs) (Created page with "MicroPython, https://micropython.org/, a subset of the popular Python 3 programming language, is available to run on many development boards, including a large selection from...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MicroPython, https://micropython.org/, a subset of the popular Python 3 programming language, is available to run on many development boards, including a large selection from STMicro.
The original development platform for MicroPython is the Pyboard, using an STM32F405RG microcontroller with 168 MHz Cortex M4 CPU, hardware floating point, 1024KiB flash ROM, and 192KiB RAM.
https://store.micropython.org/product/PYBv1.1H

Due to its lower price and additional hardware, I chose the {{#if:|{{#ifexpr:({{#time:U|{{{3}}}}} - {{#time:U|now}}) > 0|STM32F407G-DISC1 Discovery Board|STM32F407G-DISC1 Discovery Board}}|STM32F407G-DISC1 Discovery Board}}, https://www.st.com/en/evaluation-tools/stm32f4discovery.html, for $19.50.
Although many of the associated web pages use the DFU loader to program the MicroPython image into the microcontroller,
I chose to use the on-board JTAG adapter, making this a very easy two step process:

* After downloading the image, convert the .DFU image to .HEX using the DFU File Manager (Part of the DfuSe page).
  https://www.st.com/en/development-tools/stsw-stm32080.html
* Using STM32CubeProgrammer, write the .HEX file to the STM32F407G target processor.
  https://www.st.com/en/development-tools/stm32cubeprog.html

What Can I Do with MicroPython and the STM32F407G-DISC1 Discovery Board?
Let's begin with some simple exercises...

Blink LEDs