From 1ec3c1b1da3819bcebc70d541c79e25c77373c74 Mon Sep 17 00:00:00 2001 From: Ian Morris Date: Fri, 9 Aug 2024 10:52:45 -0700 Subject: [PATCH] boards: mikroe: add initial support for Mikroe STM32 M4 Clicker The STM32 M4 Clicker is a basic development board for the ST STM32F415RG Microcontroller. The board contains two LEDs and push buttons and several headers for interfacing with external devices. Signed-off-by: Ian Morris --- .../mikroe/stm32_m4_clicker/Kconfig.defconfig | 24 +++ .../Kconfig.mikroe_stm32_m4_clicker | 5 + boards/mikroe/stm32_m4_clicker/board.cmake | 8 + boards/mikroe/stm32_m4_clicker/board.yml | 8 + .../doc/img/stm32_m4_clicker.webp | Bin 0 -> 18320 bytes boards/mikroe/stm32_m4_clicker/doc/index.rst | 94 ++++++++++++ .../mikroe_stm32_m4_clicker.dts | 137 ++++++++++++++++++ .../mikroe_stm32_m4_clicker.yaml | 17 +++ .../mikroe_stm32_m4_clicker_defconfig | 24 +++ 9 files changed, 317 insertions(+) create mode 100644 boards/mikroe/stm32_m4_clicker/Kconfig.defconfig create mode 100644 boards/mikroe/stm32_m4_clicker/Kconfig.mikroe_stm32_m4_clicker create mode 100644 boards/mikroe/stm32_m4_clicker/board.cmake create mode 100644 boards/mikroe/stm32_m4_clicker/board.yml create mode 100644 boards/mikroe/stm32_m4_clicker/doc/img/stm32_m4_clicker.webp create mode 100644 boards/mikroe/stm32_m4_clicker/doc/index.rst create mode 100644 boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.dts create mode 100644 boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.yaml create mode 100644 boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker_defconfig diff --git a/boards/mikroe/stm32_m4_clicker/Kconfig.defconfig b/boards/mikroe/stm32_m4_clicker/Kconfig.defconfig new file mode 100644 index 000000000000000..082d099f4b8e50b --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/Kconfig.defconfig @@ -0,0 +1,24 @@ +# Copyright (c) 2024 Ian Morris +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_MIKROE_STM32_M4_CLICKER + +if USB_DEVICE_STACK + +config UART_CONSOLE + default CONSOLE + +config USB_DEVICE_INITIALIZE_AT_BOOT + default y + +endif # USB_DEVICE_STACK + +if LOG + +# Logger cannot use itself to log +config USB_CDC_ACM_LOG_LEVEL + default 0 + +endif # LOG + +endif # BOARD_MIKROE_STM32_M4_CLICKER diff --git a/boards/mikroe/stm32_m4_clicker/Kconfig.mikroe_stm32_m4_clicker b/boards/mikroe/stm32_m4_clicker/Kconfig.mikroe_stm32_m4_clicker new file mode 100644 index 000000000000000..052fb38bc70bf5e --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/Kconfig.mikroe_stm32_m4_clicker @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Ian Morris +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_MIKROE_STM32_M4_CLICKER + select SOC_STM32F415XX diff --git a/boards/mikroe/stm32_m4_clicker/board.cmake b/boards/mikroe/stm32_m4_clicker/board.cmake new file mode 100644 index 000000000000000..5b2d6e7bd62d701 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/board.cmake @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Ian Morris +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(pyocd "--target=stm32f415rg") +board_runner_args(jlink "--device=STM32F415RG" "--speed=4000") + +include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/boards/mikroe/stm32_m4_clicker/board.yml b/boards/mikroe/stm32_m4_clicker/board.yml new file mode 100644 index 000000000000000..56a329a900f43b4 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/board.yml @@ -0,0 +1,8 @@ +# Copyright (c) 2024 Ian Morris +# SPDX-License-Identifier: Apache-2.0 + +board: + name: mikroe_stm32_m4_clicker + vendor: mikroe + socs: + - name: stm32f415xx diff --git a/boards/mikroe/stm32_m4_clicker/doc/img/stm32_m4_clicker.webp b/boards/mikroe/stm32_m4_clicker/doc/img/stm32_m4_clicker.webp new file mode 100644 index 0000000000000000000000000000000000000000..bc4797072f024a99bc9203a4787a4f30e64bb54c GIT binary patch literal 18320 zcmV(vKodGJw z0E7WPjX0G@r6VFCFIwF2pb?2_Zp*Baexbh^{@KwCIo;wOaec%7Kfzze{%`yb_pjTZ z?jGSd+v`vL|3SZ+{p0;V_mAEG@jo^Hf&WkbKk|>!zlopW|9bWX{IB`<`oHa-#Ghx` zb+G@b|JCXd>tE3SN6@~`Z_>;K4qk^PSPb^h=FcluxUU$ws4{+|EO{*(QO$Vc<9?tl1y z$oq5u|Mw~TrT@SFhr+k*U;njJSTUAd(kn>W{$iNUriPiEu)~=0vmD*Xg)yo#cwAaT zS&B*`h<0ZG^O;Mmb9f=`nLh{zn%q@9GcfoaH@3JPhV(K77htxkH?))v4~r?xkGHIL zl|b5@a=2Pjs=gGk=9GdT5WwvT6zfkHkAkSv6B?MIXoxap^nsX-`QaHZ}q*Z2?^79ip3-CB@+N~`MF8Q zD@p=XwCvUJvvfGAk%GPD8ojrRJX8xeaNkdccStt+ud)Z^W3K_Ae%xL zHzu*$yZKGirfcN5tI^pzZ-F4M%x1mB?4(tFe5WOGU}4nSKjUw868u6==4@GSP@C^Z zW6Sw9j^8&0Ai9tKi2BKqFSN08UWtzY>4wk2K^8v7t3jx2{?rPKH|wp!g7p2FMvACX^%lWHVNB{&e z>ObnZToN7rE|HFXDws^|YWAYr#`l0}@ar52gkW;}Q(?tb`y7ml0v$2z#~#}T)eYTf z@Tl03mFS-o(Jy+{NR_Gm3Lv}N5S4fr5HD+Wz+KuGL-4Mi^pQ3Ga+(RV#-G$8t!g*J zSA5{Pi=r-c3O{paP3 z$`-|wC)KS#bsjOQ8x)ITA;w_hL$oferjdrsbj83;vpBJ41ysY0yoln6UxP+AjgMz# zZ;5q-2}sQ0P#Q@?*50G}mv$IyD~+WoBj~+?S$hFWhht76hU{#(M>jNcuVCr$>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ikroe/stm32_m4_clicker/doc/index.rst b/boards/mikroe/stm32_m4_clicker/doc/index.rst new file mode 100644 index 000000000000000..c1f9f809ac70ce5 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/doc/index.rst @@ -0,0 +1,94 @@ +.. _mikroe_stm32_m4_clicker: + +Mikroe STM32 M4 Clicker +####################### + +Overview +******** + +The Mikroe STM32 M4 Clicker development board contains a STMicroelectronics +Cortex-M4 based STM32F415RG Microcontroller operating at up to 168 MHz with +1 MB of Flash memory and 192 KB of SRAM. + +.. figure:: img/stm32_m4_clicker.webp + :align: center + :alt: STM32 M4 Clicker + + STM32 M4 Clicker (Credit: MikroElektronika d.o.o.) + +Hardware +******** + +The STM32 M4 Clicker board contains a USB connector, two LEDs, two push +buttons, and a reset button. It features a mikroBUS socket for interfacing +with external electronics. For more information about the development +board see the `STM32 M4 Clicker website`_. + +Supported Features +================== + +The ``mikroe_stm32_m4_clicker`` board target supports the following hardware +features: + ++-----------+------------+-------------------------------------+ +| Interface | Controller | Driver/Component | ++===========+============+=====================================+ +| NVIC | on-chip | nested vector interrupt controller | ++-----------+------------+-------------------------------------+ +| UART | on-chip | serial port-polling; | +| | | serial port-interrupt | ++-----------+------------+-------------------------------------+ +| PINMUX | on-chip | pinmux | ++-----------+------------+-------------------------------------+ +| I2C | on-chip | i2c | ++-----------+------------+-------------------------------------+ +| SPI | on-chip | spi | ++-----------+------------+-------------------------------------+ +| GPIO | on-chip | GPIO output | +| | | GPIO input | ++-----------+------------+-------------------------------------+ +| USB | on-chip | USB | ++-----------+------------+-------------------------------------+ + +Other hardware features have not yet been enabled for this board. + +The default configuration can be found in the defconfig file: +:zephyr_file:`boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker_defconfig`. + +Programming and debugging +************************* + +Building & Flashing +=================== + +You can build and flash an application in the usual way (See +:ref:`build_an_application` and +:ref:`application_run` for more details). + +Here is an example for building and flashing the :zephyr:code-sample:`blinky` application. + +.. zephyr-app-commands:: + :zephyr-app: samples/basic/blinky + :board: mikroe_stm32_m4_clicker + :goals: build flash + +Debugging +========= + +Debugging also can be done in the usual way. +The following command is debugging the :zephyr:code-sample:`blinky` application. +Also, see the instructions specific to the debug server that you use. + +.. zephyr-app-commands:: + :zephyr-app: samples/basic/blinky + :board: mikroe_stm32_m4_clicker + :maybe-skip-config: + :goals: debug + +References +********** + +.. target-notes:: + +.. _STM32 M4 Clicker website: + https://www.mikroe.com/clicker-stm32f4 diff --git a/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.dts b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.dts new file mode 100644 index 000000000000000..1fa6b5f0762a194 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.dts @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2024 Ian Morris + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; +#include +#include +#include + +/ { + model = "Mikroe STM32 M4 Clicker"; + compatible = "st,stm32f415rg"; + + chosen { + zephyr,console = &usb_cdc_acm_uart; + zephyr,shell-uart = &usb_cdc_acm_uart; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + ld1: led_1 { + gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>; + label = "User LED 1"; + }; + ld2: led_2 { + gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>; + label = "User LED 2"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + btn1: button_1 { + label = "User Button 1"; + gpios = <&gpioc 0 GPIO_ACTIVE_LOW>; + zephyr,code = ; + }; + btn2: button_2 { + label = "User Button 2"; + gpios = <&gpioc 1 GPIO_ACTIVE_LOW>; + zephyr,code = ; + }; + }; + + mikrobus_header: mikrobus-connector { + compatible = "mikro-bus"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map = <0 0 &gpioa 0 0>, /* AN */ + <1 0 &gpiob 5 0>, /* RST */ + <2 0 &gpiob 12 0>, /* CS */ + <3 0 &gpiob 13 0>, /* SCK */ + <4 0 &gpiob 14 0>, /* MISO */ + <5 0 &gpiob 15 0>, /* MOSI */ + /* +3.3V */ + /* GND */ + <6 0 &gpiob 0 0>, /* PWM */ + <7 0 &gpiob 1 0>, /* INT */ + <8 0 &gpioc 11 0>, /* RX */ + <9 0 &gpioc 12 0>, /* TX */ + <10 0 &gpiob 10 0>, /* SCL */ + <11 0 &gpiob 11 0>; /* SDA */ + /* +5V */ + /* GND */ + }; + + aliases { + led0 = &ld1; + led1 = &ld2; + sw0 = &btn1; + }; +}; + +&clk_lsi { + status = "okay"; +}; + +&clk_hse { + clock-frequency = ; + status = "okay"; +}; + +&pll { + div-m = <16>; + mul-n = <336>; + div-p = <2>; + div-q = <7>; + clocks = <&clk_hse>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <4>; + apb2-prescaler = <2>; +}; + +&usart3 { + pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; + pinctrl-names = "default"; + current-speed = <115200>; + status = "okay"; +}; + +&i2c2 { + pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; + status = "okay"; +}; + +&spi2 { + pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 + &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; + status = "okay"; +}; + +zephyr_udc0: &usbotg_fs { + pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; + status = "okay"; + + usb_cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +mikrobus_spi: &spi2 {}; +mikrobus_serial: &usart3 {}; +mikrobus_i2c: &i2c2 {}; diff --git a/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.yaml b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.yaml new file mode 100644 index 000000000000000..96d16aa2d63d8d4 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker.yaml @@ -0,0 +1,17 @@ +identifier: mikroe_stm32_m4_clicker +name: Mikroe STM32 M4 Clicker +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +ram: 128 +flash: 1024 +supported: + - uart + - gpio + - i2c + - spi + - usb_device +vendor: mikroe diff --git a/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker_defconfig b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker_defconfig new file mode 100644 index 000000000000000..c57c7b4b7b89a68 --- /dev/null +++ b/boards/mikroe/stm32_m4_clicker/mikroe_stm32_m4_clicker_defconfig @@ -0,0 +1,24 @@ +# Copyright (c) 2024 Ian Morris +# SPDX-License-Identifier: Apache-2.0 + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable HW stack protection +CONFIG_HW_STACK_PROTECTION=y + +# Console +CONFIG_SERIAL=y +CONFIG_CONSOLE=y + +# Enable GPIO +CONFIG_GPIO=y + +# Enable Clocks +CONFIG_CLOCK_CONTROL=y + +# Enable pin controller +CONFIG_PINCTRL=y + +# Enable USB +CONFIG_USB_DEVICE_STACK=y