Part 1
요약·해설
지원표 6행, RAM 주소 표 3행, 209MHz clock과 preloaded-firmware attach 절차를 보존했습니다.
2×A7 + M4
209MHz
4Gbit
A7 remoteproc
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
17C88B93AA6A2962DAD898EEA40291A595D256732D77B2218EDEFC6A870631B8
.. _stm32mp157c_dk2_board:
ST STM32MP157C-DK2 Discovery
############################
Overview
********
The STM32MP157-DK2 Discovery board leverages the capacities of the STM32MP157
multi-core processor,composed of a dual Cortex®-A7 and a single Cortex®-M4 core.
Zephyr OS is ported to run on the Cortex®-M4 core.
- Common features:
- STM32MP157:
- Arm®-based dual Cortex®-A7 32 bits
- Cortex®-M4 32 bits
- embedded SRAM (448 Kbytes) for Cortex®-M4.
- ST PMIC STPMIC1A
- 4-Gbit DDR3L, 16 bits, 533 MHz
- 1-Gbps Ethernet (RGMII) compliant with IEEE-802.3ab
- USB OTG HS
- Audio CODEC, with a stereo headset jack, including analog microphone input
- 4 user LEDs
- 2 user and reset push-buttons, 1 wake-up button
- 5 V / 3 A USB Type-CTM power supply input (not provided)
- Board connectors:
- Ethernet RJ45
- 4 USB Host Type-A
- USB Type-C
- DRP MIPI DSI HDMI
- Stereo headset jack including analog microphone input
- microSD card
- GPIO expansion connector (Raspberry Pi® shields capability)
- ArduinoTM Uno V3 expansion connectors
- On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration
capability: Virtual COM port and debug port
- Board-specific features:
- 4" TFT 480×800 pixels with LED backlight, MIPI DSI interface, and capacitive
touch panel
- Wi-Fi® 802.11b/g/n
- Bluetooth® Low Energy 4.1
.. image:: ../../../../../../../boards/st/stm32mp157c_dk2/doc/img/en.stm32mp157c-dk2.jpg
:align: center
:alt: STM32MP157C-DK2 Discovery
More information about the board can be found at the
`STM32P157C Discovery website`_.
Hardware
********
The STM32MP157 SoC provides the following hardware capabilities:
- Core:
- 32-bit dual-core Arm® Cortex®-A7
- L1 32-Kbyte I / 32-Kbyte D for each core
- 256-Kbyte unified level 2 cache
- Arm® NEON™ and Arm® TrustZone®
- 32-bit Arm® Cortex®-M4 with FPU/MPU
- Up to 209 MHz (Up to 703 CoreMark®)
- Memories:
- External DDR memory up to 1 Gbyte.
- 708 Kbytes of internal SRAM: 256 KB of AXI SYSRAM + 384 KB of AHB SRAM +
64 KB of AHB SRAM in backup domain.
- Dual mode Quad-SPI memory interface
- Flexible external memory controller with up to 16-bit data bus
- Security/safety:
- Secure boot, TrustZone® peripherals with Cortex®-M4 resources isolation
- Clock management:
- Internal oscillators: 64 MHz HSI oscillator, 4 MHz CSI oscillator, 32 kHz
LSI oscillator
- External oscillators: 8-48 MHz HSE oscillator, 32.768 kHz LSE oscillator
- 6 × PLLs with fractional mode
- General-purpose input/outputs:
- Up to 176 I/O ports with interrupt capability
- Interconnect matrix
- 3 DMA controllers
- Communication peripherals:
- 6 × I2C FM+ (1 Mbit/s, SMBus/PMBus)
- 4 × UART + 4 × USART (12.5 Mbit/s, ISO7816 interface, LIN, IrDA, SPI slave)
- 6 × SPI (50 Mbit/s, including 3 with full duplex I2S audio class accuracy)
- 4 × SAI (stereo audio: I2S, PDM, SPDIF Tx)
- SPDIF Rx with 4 inputs
- HDMI-CEC interface
- MDIO Slave interface
- 3 × SDMMC up to 8-bit (SD / e•MMC™ / SDIO)
- 2 × CAN controllers supporting CAN FD protocol, TTCAN capability
- 2 × USB 2.0 high-speed Host+ 1 × USB 2.0 full-speed OTG simultaneously
- 10/100M or Gigabit Ethernet GMAC (IEEE 1588v2 hardware, MII/RMII/GMII/RGMI)
- 8- to 14-bit camera interface up to 140 Mbyte/s
- 6 analog peripherals
- 2 × ADCs with 16-bit max. resolution.
- 1 × temperature sensor
- 2 × 12-bit D/A converters (1 MHz)
- 1 × digital filters for sigma delta modulator (DFSDM) with 8 channels/6
filters
- Internal or external ADC/DAC reference VREF+
- Graphics:
- 3D GPU: Vivante® - OpenGL® ES 2.0
- LCD-TFT controller, up to 24-bit // RGB888, up to WXGA (1366 × 768) @60 fps
- MIPI® DSI 2 data lanes up to 1 GHz each
- Timers:
- 2 × 32-bit timers with up to 4 IC/OC/PWM or pulse counter and quadrature
(incremental) encoder input
- 2 × 16-bit advanced motor control timers
- 10 × 16-bit general-purpose timers (including 2 basic timers without PWM)
- 5 × 16-bit low-power timers
- RTC with sub-second accuracy and hardware calendar
- 2 × 4 Cortex®-A7 system timers (secure, non-secure, virtual, hypervisor)
- 1 × SysTick Cortex®-M4 timer
- Hardware acceleration:
- AES 128, 192, 256, TDES
- HASH (MD5, SHA-1, SHA224, SHA256), HMAC
- 2 × true random number generator (3 oscillators each)
- 2 × CRC calculation unit
- Debug mode:
- Arm® CoreSight™ trace and debug: SWD and JTAG interfaces
- 8-Kbyte embedded trace buffer
- 3072-bit fuses including 96-bit unique ID, up to 1184-bit available for user
More information about STM32P157C can be found here:
- `STM32MP157C on www.st.com`_
- `STM32MP157C reference manual`_
Supported Features
==================
The Zephyr stm32mp157c_dk2 board configuration supports the following hardware
features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| PINMUX | on-chip | pinmux |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
The default configuration can be found in
:zephyr_file:`boards/st/stm32mp157c_dk2/stm32mp157c_dk2_defconfig`
Connections and IOs
===================
STM32MP157C-DK2 Discovery Board schematic is available here:
`STM32MP157C Discovery board schematics`_.
Default Zephyr Peripheral Mapping:
----------------------------------
- USART_3 TX/RX : PB10/PB12 (UART console)
- UART_7 TX/RX : PE8/PE7 (Arduino Serial)
- I2C5 SCL/SDA : PA11/PA12 (Arduino I2C)
- SPI4 SCK/MISO/MOSI : PE12/PE13/PE14 (Arduino SPI)
- SPI5 SCK/MISO/MOSI : PF7/PF8/PF9
System Clock
------------
The Cortex®-M4 Core is configured to run at a 209 MHz clock speed. This value
must match the configured mlhclk_ck frequency.
Serial Port
-----------
The STM32MP157C-DK2 Discovery board has 8 U(S)ARTs.
The Zephyr console output is assigned by default to the RAM console to be dumped
by the Linux Remoteproc Framework on Cortex®-A7 core. In order to keep the UART7
free for future serial interactions with Arduino shield, the Zephyr UART console
output is USART3 and is disabled by default. UART console can be enable through
board's devicetree and stm32mp157c_dk2_defconfig board file (or prj.conf
project files), and will disable existing RAM console output. Default UART
console settings are 115200 8N1.
Programming and Debugging
*************************
The STM32MP157C doesn't have QSPI flash for the Cortex®-M4 and it needs to be
started by the Cortex®-A7 core. The Cortex®-A7 core is responsible to load the
Cortex®-M4 binary application into the RAM, and get the Cortex®-M4 out of reset.
The Cortex®-A7 can perform these steps at bootloader level or after the Linux
system has booted.
The Cortex®-M4 can use up to 2 different RAMs. The program pointer starts at
address 0x00000000 (RETRAM), the vector table should be loaded at this address
These are the memory mappings for Cortex®-A7 and Cortex®-M4:
+------------+-----------------------+------------------------+----------------+
| Region | Cortex®-A7 | Cortex®-M4 | Size |
+============+=======================+========================+================+
| RETRAM | 0x38000000-0x3800FFFF | 0x00000000-0x0000FFFF | 64KB |
+------------+-----------------------+------------------------+----------------+
| MCUSRAM | 0x10000000-0x1005FFFF | 0x10000000-0x1005FFFF | 384KB |
+------------+-----------------------+------------------------+----------------+
| DDR | 0xC0000000-0xFFFFFFFF | | up to 1 GB |
+------------+-----------------------+------------------------+----------------+
Refer to `stm32mp157c boot Cortex-M4 firmware`_ wiki page for instruction
to load and start the Cortex-M4 firmware.
Debugging
=========
You can debug an application using OpenOCD and GDB. The Solution proposed below
is based on the attach to a preloaded firmware, available only for a Linux
environment. The firmware must first be loaded by the Cortex®-A7. Developer
then attaches the debugger to the running Zephyr using OpenOCD.
Principle is to attach to the firmware already loaded by the Linux.
- Build the sample:
.. code-block:: console
west build -b stm32mp157c_dk2 samples/hello_world
- Copy the firmware on the target filesystem, load it and start it (`stm32mp157c boot Cortex-M4 firmware`_).
- Attach to the target:
.. code-block:: console
west attach
.. _STM32P157C Discovery website:
https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157c-dk2.html
.. _STM32MP157C Discovery board User Manual:
https://www.st.com/resource/en/user_manual/dm00591354.pdf
.. _STM32MP157C Discovery board schematics:
https://www.st.com/resource/en/schematic_pack/mb1272-dk2-c01_schematic.pdf
.. _STM32MP157C on www.st.com:
https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-arm-cortex-mpus/stm32mp1-series/stm32mp157/stm32mp157c.html
.. _STM32MP157C reference manual:
https://www.st.com/resource/en/reference_manual/DM00327659.pdf
.. _stm32mp1 developer package:
https://wiki.st.com/stm32mpu/index.php/STM32MP1_Developer_Package#Installing_the_SDK
.. _stm32mp157c boot Cortex-M4 firmware:
https://wiki.st.com/stm32mpu/index.php/Linux_remoteproc_framework_overview#How_to_use_the_framework
Part 3
한국어 전문 번역

개요
STM32MP157-DK2는 dual Cortex-A7과 single Cortex-M4로 구성된 STM32MP157 multi-core processor의 기능을 활용합니다. Zephyr OS는 Cortex-M4 core에서 실행됩니다.
공통 기능
- STM32MP157
- 32-bit dual Cortex-A7
- 32-bit Cortex-M4
- Cortex-M4용 embedded SRAM 448KB
- STPMIC1A PMIC
- 16-bit 533MHz DDR3L 4Gbit
- IEEE-802.3ab compliant 1Gbps RGMII Ethernet
- USB OTG HS
- analog microphone input·stereo headset jack을 포함한 Audio CODEC
- user LED 4개
- user button 2개·reset button·wake-up button
- 별도 제공되지 않는 5V/3A USB Type-C power input
- connector
- Ethernet RJ45
- USB Host Type-A 4개
- USB Type-C
- DRP MIPI DSI HDMI
- analog microphone input 포함 stereo headset
- microSD
- Raspberry Pi shield용 GPIO expansion
- Arduino Uno V3
- VCP·debug port를 제공하는 USB re-enumeration ST-LINK/V2-1
DK2 전용 기능
- LED backlight·MIPI DSI·capacitive touch가 있는 4-inch 480×800 TFT
- Wi-Fi 802.11b/g/n
- Bluetooth Low Energy 4.1
하드웨어
- core
- dual Cortex-A7
- core별 32KB I-cache·32KB D-cache
- unified L2 cache 256KB
- NEON·TrustZone
- FPU·MPU Cortex-M4
- 최대 209MHz
- 최대 703 CoreMark
- dual Cortex-A7
- memory
- external DDR 최대 1GB
- 원문 표기 internal SRAM 708KB: AXI SYSRAM 256KB + AHB SRAM 384KB + backup-domain AHB SRAM 64KB
- dual-mode Quad-SPI interface
- 최대 16-bit data bus flexible external-memory controller
- secure boot와 Cortex-M4 resource isolation을 지원하는 TrustZone peripheral
- clock
- internal 64MHz HSI·4MHz CSI·32kHz LSI
- external 8~48MHz HSE·32.768kHz LSE
- fractional mode PLL 6개
- interrupt-capable I/O port 최대 176개
- interconnect matrix
- DMA controller 3개
- communication peripheral
- I2C FM+ 6개, 1Mbit/s SMBus/PMBus
- UART 4개 + USART 4개, 12.5Mbit/s·ISO7816·LIN·IrDA·SPI slave
- SPI 6개, 최대 50Mbit/s, 그중 full-duplex I2S 3개
- SAI 4개
- 4-input SPDIF Rx
- HDMI-CEC
- MDIO Slave
- 8-bit SD/eMMC/SDIO SDMMC 3개
- CAN FD·TTCAN controller 2개
- USB 2.0 HS Host 2개와 USB 2.0 FS OTG 1개 동시 사용
- IEEE 1588v2 10/100M 또는 Gigabit Ethernet GMAC
- 최대 140MB/s 8~14-bit camera
- analog peripheral 6개
- 최대 16-bit ADC 2개
- temperature sensor 1개
- 1MHz 12-bit DAC 2개
- 8-channel/6-filter DFSDM 1개
- internal/external VREF+
- graphics
- Vivante OpenGL ES 2.0 3D GPU
- 최대 WXGA 1366×768@60fps, 24-bit RGB888 LCD-TFT
- lane당 최대 1GHz MIPI DSI 2-lane
- timer
- IC/OC/PWM 또는 encoder input을 갖춘 32-bit 2개
- advanced motor-control 16-bit 2개
- general-purpose 16-bit 10개, PWM 없는 basic 2개 포함
- low-power 16-bit 5개
- sub-second RTC
- Cortex-A7 system timer 2×4: secure·non-secure·virtual·hypervisor
- Cortex-M4 SysTick 1개
- hardware acceleration
- AES-128/192/256·TDES
- MD5·SHA-1·SHA224·SHA256 HASH와 HMAC
- oscillator 3개씩인 TRNG 2개
- CRC unit 2개
- debug
- CoreSight SWD·JTAG
- embedded trace buffer 8KB
- 96-bit unique ID와 user용 최대 1184-bit를 포함한 3072-bit fuse
Zephyr 지원 기능
| 인터페이스 | 컨트롤러 | 드라이버/컴포넌트 |
|---|---|---|
| NVIC | on-chip | nested vector interrupt controller |
| GPIO | on-chip | gpio |
| UART | on-chip | serial port-polling; serial port-interrupt |
| PINMUX | on-chip | pinmux |
| I2C | on-chip | i2c |
| SPI | on-chip | spi |
기본 설정은 boards/st/stm32mp157c_dk2/stm32mp157c_dk2_defconfig입니다.
연결과 I/O
기본 Zephyr 주변장치 매핑
USART_3 TX/RX : PB10/PB12 (UART console)UART_7 TX/RX : PE8/PE7 (Arduino Serial)I2C5 SCL/SDA : PA11/PA12 (Arduino I2C)SPI4 SCK/MISO/MOSI : PE12/PE13/PE14 (Arduino SPI)SPI5 SCK/MISO/MOSI : PF7/PF8/PF9
System clock
Cortex-M4는 209MHz로 설정되며 이 값은 구성된 mlhclk_ck frequency와 일치해야 합니다.
Serial port
U(S)ART는 8개입니다. 기본 console은 Cortex-A7 Linux Remoteproc Framework가 dump하는 RAM console입니다. Arduino shield용 UART7을 남겨 두기 위해 UART console은 USART3에 연결되지만 기본적으로 disabled입니다. Devicetree와 stm32mp157c_dk2_defconfig 또는 project prj.conf에서 UART console을 enable하면 기존 RAM console은 disabled됩니다. 기본 UART 설정은 115200 8N1입니다.
프로그래밍
STM32MP157C에는 Cortex-M4용 QSPI flash가 없습니다. Cortex-A7가 M4 binary를 RAM으로 적재하고 M4 reset을 해제해야 합니다. 이 작업은 bootloader 단계 또는 Linux boot 이후에 수행할 수 있습니다. M4 program pointer는 0x00000000인 RETRAM에서 시작하므로 vector table도 이 주소에 적재해야 합니다.
| 영역 | Cortex-A7 | Cortex-M4 | 크기 |
|---|---|---|---|
| RETRAM | 0x38000000-0x3800FFFF | 0x00000000-0x0000FFFF | 64KB |
| MCUSRAM | 0x10000000-0x1005FFFF | 0x10000000-0x1005FFFF | 384KB |
| DDR | 0xC0000000-0xFFFFFFFF | 최대 1GB |
디버깅
Linux 환경에서 미리 적재되어 실행 중인 firmware에 OpenOCD와 GDB로 attach하는 방식입니다. 먼저 Cortex-A7가 firmware를 적재해야 합니다.
sample 빌드
west build -b stm32mp157c_dk2 samples/hello_worldfirmware를 target filesystem으로 복사해 load·start한 다음 attach합니다.
west attach
참고 자료
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.