boards/atmel/sam/sam4e_xpro/doc/index.html · boards/atmel/sam/sam4e_xpro/doc/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Atmel SAM4E · Cortex-M4F

SAM4E Xplained Pro

CAN·Ethernet·NAND·SD를 갖춘 ATSAM4E16E Cortex-M4F 평가 플랫폼입니다.

Official pathboards/atmel/sam/sam4e_xpro/doc/index.html
Source fileboards/atmel/sam/sam4e_xpro/doc/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

SAM4E Xplained Pro는 120 MHz Cortex-M4F 보드입니다. factory-new chip은 SAM-BA로 boot하므로 OpenOCD가 GPNVM1을 설정해 flash boot로 전환합니다.

SAM4E Xplained Pro
SAM4E Xplained Pro. 이미지 출처: Microchip, Zephyr 3.7.0.
CPU

ATSAM4E16E Cortex-M4F

Clock

12 MHz → PLL → 120 MHz

Flash paths

OpenOCD 또는 SAM-BA/bossac

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 3E105A07947F0139329E6C9B1D75B1415559BFDF0DF362B52BB7DF559D5349F3
.. _sam4e_xpro:

SAM4E Xplained Pro
###################

Overview
********

The SAM4E Xplained Pro evaluation kit is a development platform to evaluate the
Atmel SAM4E series microcontrollers.

.. image:: ../../../../../../../../boards/atmel/sam/sam4e_xpro/doc/img/sam4e_xpro.jpg
     :align: center
     :alt: SAM4E Xplained Pro

Hardware
********

- ATSAM4E16E ARM Cortex-M4F Processor
- 12 MHz crystal oscillator
- internal 32.768 kHz crystal oscillator
- 2 x IS61WV5128BLL 4Mb SRAM
- MT29F2G08ABAEAWP 2Gb NAND
- SD card connector
- CAN-bus (TLE7250GVIOXUMA1 CAN Transceiver)
- Ethernet port (KSZ8081MNXIA phy)
- Micro-AB USB device
- Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data
  Gateway Interface (DGI)
- One reset and one user pushbutton
- 1 yellow user LEDs


Supported Features
==================

The sam4e_xpro board configuration supports the following hardware
features:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component                    |
+===========+============+=====================================+
| NVIC      | on-chip    | nested vector interrupt controller  |
+-----------+------------+-------------------------------------+
| SYSTICK   | on-chip    | systick                             |
+-----------+------------+-------------------------------------+
| GPIO      | on-chip    | gpio                                |
+-----------+------------+-------------------------------------+
| AFEC      | on-chip    | adc                                 |
+-----------+------------+-------------------------------------+
| COUNTER   | on-chip    | counter                             |
+-----------+------------+-------------------------------------+
| ETHERNET  | on-chip    | ethernet                            |
+-----------+------------+-------------------------------------+
| HWINFO    | on-chip    | hwinfo                              |
+-----------+------------+-------------------------------------+
| HSMCI     | on-chip    | sdhc                                |
+-----------+------------+-------------------------------------+
| I2C       | on-chip    | i2c                                 |
+-----------+------------+-------------------------------------+
| PWM       | on-chip    | pwm                                 |
+-----------+------------+-------------------------------------+
| SPI       | on-chip    | spi                                 |
+-----------+------------+-------------------------------------+
| UART      | on-chip    | serial port                         |
+-----------+------------+-------------------------------------+
| USART     | on-chip    | serial port                         |
+-----------+------------+-------------------------------------+
| WATCHDOG  | on-chip    | watchdog                            |
+-----------+------------+-------------------------------------+

Other hardware features are not currently supported by Zephyr.

The default configuration can be found in the Kconfig
:zephyr_file:`boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig`.

Connections and IOs
===================

The `SAM4E Xplained Pro User Guide`_ has detailed information about board
connections. Download the `SAM4E Xplained Pro documentation`_ for more detail.

System Clock
============

The SAM4E MCU is configured to use the 12 MHz internal oscillator on the board
with the on-chip PLL to generate an 120 MHz system clock.

Serial Port
===========

The ATSAM4E16E MCU has 2 UARTs and 2 USARTs. One of the UARTs (UART0) is
configured for the console and is available as a Virtual COM Port by EDBG USB
chip.

Programming and Debugging
*************************

Flashing the Zephyr project onto SAM4E MCU requires the `OpenOCD tool`_.
By default a factory new SAM4E chip will boot SAM-BA boot loader located in
the ROM, not the flashed image. This is determined by the value of GPNVM1
(General-Purpose NVM bit 1). The flash procedure will ensure that GPNVM1 is
set to 1 changing the default behavior to boot from Flash.

If your chip has a security bit GPNVM0 set you will be unable to program flash
memory or connect to it via a debug interface. The only way to clear GPNVM0
is to perform a chip erase procedure that will erase all GPNVM bits and the full
contents of the SAM4E flash memory:

- With the board power off, set a jumper on the J304 header.
- Turn the board power on. The jumper can be removed soon after the power is on
  (flash erasing procedure is started when the erase line is asserted for at
  least 230ms)

Flashing
========

For flash the board Zephyr provides two paths.  One uses the default OpenOCD
tool and the second one uses :ref:`atmel_sam_ba_bootloader`.

Using OpenOCD
-------------

#. Connect the SAM4E Xplained Pro board to your host computer using the USB
   debug port. Then build and flash the :ref:`hello_world` application.

   .. zephyr-app-commands::
      :zephyr-app: samples/hello_world
      :board: sam4e_xpro
      :goals: build flash

Using SAM-BA bootloader
-----------------------

#. Close the ``ERASE`` jumper on the SAM4E Xplained Pro board.  Power on the
   board for 10s.

#. Open the ``ERASE`` jumper.

#. Connect the SAM4E Xplained Pro board to your host computer using the SoC
   USB port. Then build and flash the :ref:`hello_world` application.

   .. zephyr-app-commands::
      :zephyr-app: samples/hello_world
      :board: sam4e_xpro
      :goals: build

   .. code-block:: console

      $ west flash -r bossac

Visualizing the message
-----------------------

#. Run your favorite terminal program to listen for output. Under Linux the
   terminal should be :code:`/dev/ttyACM0`. For example:

   .. code-block:: console

      $ minicom -D /dev/ttyACM0 -o

   The -o option tells minicom not to send the modem initialization string.
   Connection should be configured as follows:

   - Speed: 115200
   - Data: 8 bits
   - Parity: None
   - Stop bits: 1

#. Press reset button

   You should see "Hello World! sam4e_xpro" in your terminal.

Debugging
=========

You can debug an application in the usual way.  Here is an example for the
:ref:`hello_world` application.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: sam4e_xpro
   :maybe-skip-config:
   :goals: debug

References
**********

.. target-notes::

.. _SAM4E Xplained Pro User Guide:
    http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42216-SAM4E-Xplained-Pro_User-Guide.pdf

.. _SAM4E Xplained Pro documentation:
    http://ww1.microchip.com/downloads/en/DeviceDoc/SAM4E-Xplained-Pro_Design-Documentation.zip

.. _OpenOCD tool:
    http://openocd.org/

.. _SAM-BA:
    https://www.microchip.com/developmenttools/ProductDetails/PartNO/SAM-BA%20In-system%20Programmer

Part 3

한국어 전문 번역

개요

SAM4E Xplained Pro evaluation kit는 Atmel SAM4E series microcontroller를 평가하는 개발 platform입니다.

SAM4E Xplained Pro board
SAM4E Xplained Pro 보드.

하드웨어

  • ATSAM4E16E Arm Cortex-M4F processor
  • 12 MHz crystal oscillator와 internal 32.768 kHz crystal oscillator
  • IS61WV5128BLL 4 Mb SRAM 2개, MT29F2G08ABAEAWP 2 Gb NAND
  • SD card connector, TLE7250GVIOXUMA1 CAN transceiver, KSZ8081MNXIA PHY Ethernet
  • Micro-AB USB device
  • CMSIS-DAP, Virtual COM Port, DGI를 지원하는 Micro-AB USB debug interface
  • reset button 1개, user pushbutton 1개, yellow user LED 1개

지원 기능

InterfaceControllerDriver/Component
NVICon-chipnested vector interrupt controller
SYSTICKon-chipsystick
GPIOon-chipgpio
AFECon-chipadc
COUNTERon-chipcounter
ETHERNETon-chipethernet
HWINFOon-chiphwinfo
HSMCIon-chipsdhc
I2Con-chipi2c
PWMon-chippwm
SPIon-chipspi
UARTon-chipserial port
USARTon-chipserial port
WATCHDOGon-chipwatchdog

다른 hardware는 현재 Zephyr에서 지원하지 않습니다. 기본 구성은 boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig입니다.

연결과 I/O

board connection은 SAM4E Xplained Pro User Guide와 design documentation을 참고합니다.

System clock

board의 12 MHz oscillator와 on-chip PLL로 120 MHz system clock을 생성합니다.

Serial port

ATSAM4E16E에는 UART 2개와 USART 2개가 있습니다. UART0이 console로 설정되고 EDBG USB chip의 Virtual COM Port로 제공됩니다.

프로그래밍과 디버깅

SAM4E MCU에 Zephyr를 flash하려면 OpenOCD가 필요합니다. factory-new chip은 flash image가 아니라 ROM의 SAM-BA bootloader로 boot합니다. 이 동작은 General-Purpose NVM bit 1인 GPNVM1 값으로 정해지며, flash 절차가 이를 1로 설정해 기본 boot를 flash로 바꿉니다.

security bit GPNVM0가 설정되어 있으면 flash를 program할 수 없고 debug interface로 연결할 수도 없습니다. GPNVM0를 지우는 유일한 방법은 모든 GPNVM bit와 flash 전체 내용을 지우는 chip erase입니다.

  1. 보드 전원을 끄고 J304 header에 jumper를 연결합니다.
  2. 전원을 켭니다. erase line을 최소 230 ms assert하면 erase가 시작되므로 전원이 들어온 직후 jumper를 제거해도 됩니다.

Flashing

Zephyr는 기본 OpenOCD와 SAM-BA bootloader 두 경로를 제공합니다.

OpenOCD 사용

USB debug port로 연결한 뒤 hello_world를 build하고 flash합니다.

west build -b sam4e_xpro samples/hello_world
west flash

SAM-BA bootloader 사용

  1. ERASE jumper를 닫고 보드 전원을 10초 동안 켭니다.
  2. ERASE jumper를 엽니다.
  3. SoC USB port로 연결하고 application을 build합니다.
west build -b sam4e_xpro samples/hello_world
west flash -r bossac

출력 확인

Linux terminal 예시는 /dev/ttyACM0이며 다음처럼 엽니다.

minicom -D /dev/ttyACM0 -o

-o는 minicom이 modem initialization string을 보내지 않게 합니다. 연결은 115200 baud, 8 data bit, parity none, 1 stop bit로 설정합니다.

reset button을 누르면 terminal에 Hello World! sam4e_xpro가 나타납니다.

Debugging

sam4e_xpro target으로 일반 Zephyr debug 절차를 사용합니다.

참고 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.