• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. _module-pw_sys_io_baremetal_stm32f429:
2
3-----------------------------
4pw_sys_io_baremetal_stm32f429
5-----------------------------
6``pw_sys_io_baremetal_stm32f429`` implements the ``pw_sys_io`` facade over
7UART.
8
9The STM32F429 baremetal sys IO backend provides device startup code and a UART
10driver layer that allows applications built against the ``pw_sys_io`` interface
11to run on a STM32F429 chip and do simple input/output via UART. The code is
12optimized for the STM32F429I-DISC1, using USART1 (which is connected to the
13virtual COM port on the embedded ST-LINKv2 chip). However, this should work with
14all STM32F429 variations (and even some STM32F4xx chips).
15
16This backend has no configuration options. The point of it is to provide bare-
17minimum platform code needed to do UART reads/writes.
18
19Setup
20=====
21This module requires relatively minimal setup:
22
231. Write code against the ``pw_sys_io`` facade.
242. Specify the ``dir_pw_sys_io_backend`` GN global variable to point to this
25   backend.
263. Build an executable with a main() function using a toolchain that
27   supports Cortex-M4.
28
29.. note::
30   This module provides early firmware init and a linker script, so it will
31   conflict with other modules that do any early device init or provide a linker
32   script.
33
34Module usage
35============
36After building an executable that utilizes this backend, flash the
37produced .elf binary to the development board. Then, using a serial
38communication terminal like minicom/screen (Linux/Mac) or TeraTerm (Windows),
39connect to the device at a baud rate of 115200 (8N1). If you're not using a
40STM32F429I-DISC1 development board, manually connect a USB-to-serial TTL adapter
41to pins ``PA9`` (MCU TX) and ``PA10`` (MCU RX), making sure to match logic
42levels (e.g. 3.3V versus 1.8V).
43
44Sample connection diagram
45-------------------------
46
47.. code-block:: text
48
49   --USB Serial--+    +-----STM32F429 MCU-----
50                 |    |
51              TX o--->o PA10/USART1_RX
52                 |    |
53              RX o<---o PA9/USART1_TX
54                 |    |
55   --------------+    +-----------------------
56
57Dependencies
58============
59- :ref:`module-pw_sys_io`
60- :ref:`module-pw_preprocessor`
61