board: arm: add support for nuvoton pfm m467
add support for nuvoton pfm m467 development board Signed-off-by: cyliang tw <cyliang@nuvoton.com>
This commit is contained in:
parent
0fd564ef7f
commit
246bd7a290
10 changed files with 307 additions and 0 deletions
9
boards/arm/numaker_pfm_m467/Kconfig.board
Normal file
9
boards/arm/numaker_pfm_m467/Kconfig.board
Normal file
|
@ -0,0 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Nuvoton PFM M467 board configuration
|
||||
#
|
||||
# Copyright (c) 2023 Nuvoton Technology Corporation.
|
||||
|
||||
config BOARD_NUMAKER_PFM_M467
|
||||
bool "NUVOTON PFM M467 Development Board"
|
||||
depends on SOC_M467
|
19
boards/arm/numaker_pfm_m467/Kconfig.defconfig
Normal file
19
boards/arm/numaker_pfm_m467/Kconfig.defconfig
Normal file
|
@ -0,0 +1,19 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Nuvoton PFM M467 board configuration
|
||||
#
|
||||
# Copyright (c) 2023 Nuvoton Technology Corporation.
|
||||
|
||||
if BOARD_NUMAKER_PFM_M467
|
||||
|
||||
config BOARD
|
||||
default "numaker_pfm_m467"
|
||||
|
||||
if NETWORKING
|
||||
|
||||
config NET_L2_ETHERNET
|
||||
default y if !MODEM
|
||||
|
||||
endif # NETWORKING
|
||||
|
||||
endif # BOARD_NUMAKER_PFM_M467
|
9
boards/arm/numaker_pfm_m467/board.cmake
Normal file
9
boards/arm/numaker_pfm_m467/board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(nulink "-f")
|
||||
board_runner_args(pyocd "--target=m467hjhae")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nulink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/canopen.board.cmake)
|
99
boards/arm/numaker_pfm_m467/doc/index.rst
Normal file
99
boards/arm/numaker_pfm_m467/doc/index.rst
Normal file
|
@ -0,0 +1,99 @@
|
|||
.. _nuvoton_pfm_m467:
|
||||
|
||||
NUVOTON NUMAKER PFM M467
|
||||
########################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The NuMaker PFM M467 is an Internet of Things (IoT) application focused platform
|
||||
specially developed by Nuvoton. The PFM-M467 is based on the NuMicro® M467
|
||||
Ethernet series MCU with ARM® -Cortex®-M4F core.
|
||||
|
||||
.. image:: ./pfm_m467.jpeg
|
||||
:width: 720px
|
||||
:align: center
|
||||
:alt: PFM-M467
|
||||
|
||||
Features:
|
||||
=========
|
||||
- 32-bit Arm Cortex®-M4 M467HJHAE MCU
|
||||
- Core clock up to 200 MHz
|
||||
- 1024 KB embedded Dual Bank Flash and 512 KB SRAM
|
||||
- Ethernet (IP101GR) for network application
|
||||
- USB 2.0 High-Speed OTG / Host / Device
|
||||
- USB 1.1 Full-Speed OTG / Host / Device
|
||||
- External SPI Flash (Winbond W25Q20) which can be regarded as ROM module
|
||||
- MicroSD Card slot for T-Flash
|
||||
- Arduino UNO compatible interface
|
||||
- Three push-buttons: one is for reset and the other two are for user-defined
|
||||
- Four LEDs: one is for power indication and the other three are for user-defined
|
||||
- On-board NU-Link2 ICE debugger/programmer with SWD connector
|
||||
|
||||
More information about the board can be found at the `PFM M467 User Manual`_.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
* The on-board 12-MHz crystal allows the device to run at its maximum operating speed of 200MHz.
|
||||
|
||||
The development board configuration supports the following hardware features:
|
||||
|
||||
+-----------+------------+-----------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=======================+
|
||||
| NVIC | on-chip | nested vectored |
|
||||
| | | interrupt controller |
|
||||
+-----------+------------+-----------------------+
|
||||
| SYSTICK | on-chip | system clock |
|
||||
+-----------+------------+-----------------------+
|
||||
| UART | on-chip | serial port |
|
||||
+-----------+------------+-----------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+-----------------------+
|
||||
|
||||
Other hardware features are not yet supported on Zephyr porting.
|
||||
|
||||
More details about the supported peripherals are available in `M460 TRM`_
|
||||
Other hardware features are not currently supported by the Zephyr kernel.
|
||||
|
||||
Building and Flashing
|
||||
*********************
|
||||
Flashing
|
||||
========
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
On board debugger Nu-link2 can emulate UART0 as a virtual COM port over usb,
|
||||
To enable this, set ISW1 DIP switch 1-3 (TXD RXD VOM) to ON.
|
||||
Connect the PFM M467 IoT to your host computer using the USB port, then
|
||||
run a serial host program to connect with your board. For example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ minicom -D /dev/ttyACM0
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: numaker_pfm_m467
|
||||
:goals: flash
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: numaker_pfm_m467
|
||||
:goals: debug
|
||||
|
||||
Step through the application in your debugger.
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. _PFM M467 User Manual:
|
||||
https://www.nuvoton.com/export/resource-files/UM_NuMaker-PFM-M467_User_Manual_EN_Rev1.01.pdf
|
||||
.. _M460 TRM:
|
||||
https://www.nuvoton.com/export/resource-files/TRM_M460_Series_EN_Rev1.01.pdf
|
BIN
boards/arm/numaker_pfm_m467/doc/pfm_m467.jpeg
Normal file
BIN
boards/arm/numaker_pfm_m467/doc/pfm_m467.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
23
boards/arm/numaker_pfm_m467/numaker_pfm_m467-pinctrl.dtsi
Normal file
23
boards/arm/numaker_pfm_m467/numaker_pfm_m467-pinctrl.dtsi
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Nuvoton Technology Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "pinctrl/m467hjhae-pinctrl.h"
|
||||
|
||||
&pinctrl {
|
||||
uart0_default: uart0_default {
|
||||
pinmux = <PB12MFP_UART0_RXD>,
|
||||
<PB13MFP_UART0_TXD>;
|
||||
};
|
||||
|
||||
/* TX/RX/RTS/CTS/RST --> D1/D0/A2/A3/D2 --> PB3/PB2/PB8/PB9/PC9 */
|
||||
uart1_default: uart1_default {
|
||||
pinmux = <PB9MFP_UART1_nCTS>,
|
||||
<PB8MFP_UART1_nRTS>,
|
||||
<PB2MFP_UART1_RXD>,
|
||||
<PB3MFP_UART1_TXD>,
|
||||
<PC9MFP_GPIO>;
|
||||
};
|
||||
};
|
107
boards/arm/numaker_pfm_m467/numaker_pfm_m467.dts
Normal file
107
boards/arm/numaker_pfm_m467/numaker_pfm_m467.dts
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Nuvoton Technology Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <nuvoton/m46x.dtsi>
|
||||
#include "numaker_pfm_m467-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Nuvoton PFM M467 board";
|
||||
compatible = "nuvoton,pfm-m467", "nuvoton,m467";
|
||||
|
||||
aliases {
|
||||
led0 = &green_led;
|
||||
led1 = &blue_led;
|
||||
led2 = &red_led;
|
||||
sw0 = &user_button_1;
|
||||
sw1 = &user_button_2;
|
||||
};
|
||||
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
red_led: led_0 {
|
||||
gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD1";
|
||||
};
|
||||
green_led: led_1 {
|
||||
gpios = <&gpioh 6 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD2";
|
||||
};
|
||||
blue_led: led_2 {
|
||||
gpios = <&gpioh 5 GPIO_ACTIVE_LOW>;
|
||||
label = "User LD3";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button_1: button_1 {
|
||||
label = "User SW2";
|
||||
gpios = <&gpioh 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
user_button_2: button_2 {
|
||||
label = "User SW3";
|
||||
gpios = <&gpioh 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&scc {
|
||||
/* For USB 1.1 Host/Device/OTG, configure to 192MHz, which can generate necessary 48MHz. */
|
||||
/* For USB 2.0 Host/Device/OTG or no USB application, comment out to use default. */
|
||||
core-clock = <192000000>;
|
||||
};
|
||||
|
||||
&gpiob {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpioh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
slot0_partition: partition@0 {
|
||||
label = "image-0";
|
||||
reg = <0x00000000 0x00080000>;
|
||||
};
|
||||
slot1_partition: partition@80000 {
|
||||
label = "image-1";
|
||||
reg = <0x00080000 0x0007e000>;
|
||||
};
|
||||
storage_partition: partition@fe000 {
|
||||
label = "storage";
|
||||
reg = <0x000fe000 0x00002000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sram0 {
|
||||
reg = <0x20000000 DT_SIZE_K(512)>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
17
boards/arm/numaker_pfm_m467/numaker_pfm_m467.yaml
Normal file
17
boards/arm/numaker_pfm_m467/numaker_pfm_m467.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Copyright (c) 2023 Nuvoton Technology Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
identifier: numaker_pfm_m467
|
||||
name: NUVOTON NUMAKER-PFM-M467 Kit
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
ram: 512
|
||||
flash: 1024
|
||||
supported:
|
||||
- gpio
|
||||
testing:
|
||||
default: true
|
22
boards/arm/numaker_pfm_m467/numaker_pfm_m467_defconfig
Normal file
22
boards/arm/numaker_pfm_m467/numaker_pfm_m467_defconfig
Normal file
|
@ -0,0 +1,22 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_M46X=y
|
||||
CONFIG_SOC_M467=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable system clock controller driver
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CLOCK_CONTROL_NUMAKER_SCC=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=200000000
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
|
||||
# console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
2
boards/arm/numaker_pfm_m467/support/openocd.cfg
Normal file
2
boards/arm/numaker_pfm_m467/support/openocd.cfg
Normal file
|
@ -0,0 +1,2 @@
|
|||
source [find interface/nulink.cfg]
|
||||
source [find target/numicro.cfg]
|
Loading…
Add table
Add a link
Reference in a new issue