text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```unknown # Kernel Options due to Low Memory (8k) CONFIG_MAIN_STACK_SIZE=640 CONFIG_IDLE_STACK_SIZE=200 CONFIG_ISR_STACK_SIZE=512 # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_l031k6/nucleo_l031k6_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```unknown /* */ / { arduino_nano_header: connector { compatible = "arduino-nano-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 10 0>, /* D0 */ <1 0 &gpioa 9 0>, /* D1 */ <2 0 &gpioa 12 0>, /* D2 */ <3 0 &gpiob 0 0>, /* D3 */ <4 0 &gpiob 7 0>, /* D4 */ <5 0 &gpioa 6 0>, /* D5 */ <6 0 &gpiob 1 0>, /* D6 */ <7 0 &gpioc 14 0>, /* D7 */ <8 0 &gpioc 15 0>, /* D8 */ <9 0 &gpioa 8 0>, /* D9 */ <10 0 &gpioa 11 0>, /* D10 */ <11 0 &gpiob 5 0>, /* D11 */ <12 0 &gpiob 4 0>, /* D12 */ <13 0 &gpiob 3 0>, /* D13 */ <14 0 &gpioa 0 0>, /* D14 / A0 */ <15 0 &gpioa 1 0>, /* D15 / A1 */ <16 0 &gpioa 3 0>, /* D16 / A2 */ <17 0 &gpioa 4 0>, /* D17 / A3 */ <18 0 &gpioa 5 0>, /* D18 / A4 */ <19 0 &gpioa 6 0>, /* D19 / A5 */ <20 0 &gpioa 7 0>, /* D20 / A6 */ <21 0 &gpioa 2 0>; /* D21 / A7 */ }; }; ```
/content/code_sandbox/boards/st/nucleo_l031k6/arduino_nano_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
497
```unknown /* * */ /dts-v1/; #include <st/l0/stm32l031X6.dtsi> #include <st/l0/stm32l031k(4-6)tx-pinctrl.dtsi> #include "arduino_nano_r3_connector.dtsi" / { model = "STMicroelectronics STM32L031K6-NUCLEO board"; compatible = "st,stm32l031k6-nucleo"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds: leds { compatible = "gpio-leds"; green_led_2: led_2 { gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; aliases { led0 = &green_led_2; eeprom-0 = &eeprom; }; }; &clk_hsi { status = "okay"; }; &pll { div = <2>; mul = <4>; clocks = <&clk_hsi>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(32)>; ahb-prescaler = <1>; apb1-prescaler = <1>; apb2-prescaler = <1>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pa9 &i2c1_sda_pa10>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; pinctrl-names = "default"; status = "okay"; }; &eeprom { status = "okay"; }; ```
/content/code_sandbox/boards/st/nucleo_l031k6/nucleo_l031k6.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
482
```yaml board: name: nucleo_l031k6 vendor: st socs: - name: stm32l031xx ```
/content/code_sandbox/boards/st/nucleo_l031k6/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown # STM32 Nucleo-32 development board with STM32L031K6 MCU if BOARD_NUCLEO_L031K6 config SPI_STM32_INTERRUPT default y depends on SPI endif # BOARD_NUCLEO_L031K6 ```
/content/code_sandbox/boards/st/nucleo_l031k6/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
58
```yaml identifier: nucleo_l031k6 name: ST Nucleo L031K6 type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools supported: - gpio - i2c - spi - eeprom ram: 8 flash: 32 vendor: st ```
/content/code_sandbox/boards/st/nucleo_l031k6/nucleo_l031k6.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
86
```ini # This is an ST NUCLEO-L031K6 board with single STM32L031K6 chip. # path_to_url source [find interface/stlink.cfg] transport select hla_swd source [find target/stm32l0.cfg] # There is only system reset line and JTAG/SWD command can be issued when SRST reset_config srst_only $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/nucleo_l031k6/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
139
```restructuredtext .. _sam_e70_xplained: SAM E70(B) Xplained ################### Overview ******** The SAM E70 Xplained evaluation kit is a development platform to evaluate the Atmel SAM E70 series microcontrollers. The current version allows to use both IC variations ATSAME70Q21A(B). .. image:: img/sam_e70_xplained.jpg :align: center :alt: SAM E70 Xplained Hardware ******** - ATSAME70Q21A(B) ARM Cortex-M7 Processor - 12 MHz crystal oscillator - 32.768 kHz crystal oscillator (not populated) - AT24MAC402 EEPROM - IS42S16100E 16 Mb SDRAM - SD card connector - Ethernet port - Micro-AB USB device - Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data Gateway Interface (DGI) - JTAG interface connector - One reset and one user pushbutton - One green user LED Supported Features ================== The sam_e70_xplained board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ | AFEC | on-chip | adc | +-----------+------------+-------------------------------------+ | CAN FD | on-chip | can | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | DAC | on-chip | dac | +-----------+------------+-------------------------------------+ | HWINFO | on-chip | Unique device serial number | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | I2S | on-chip | i2s | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ | USB | on-chip | USB device | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ | XDMAC | on-chip | dma | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig :zephyr_file:`boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig`. Connections and IOs =================== The `SAME70-XPLD User Guide`_ has detailed information about board connections. System Clock ============ The SAM E70 MCU is configured to use the 12 MHz external oscillator on the board with the on-chip PLL to generate a 300 MHz system clock. Serial Port =========== The ATSAME70Q21 MCU has five UARTs and three USARTs. One of the USARTs is configured for the console and is available as a Virtual COM Port via EDBG USB chip. Programming and Debugging ************************* Flashing the Zephyr project onto SAM E70 MCU requires the `OpenOCD tool`_. Support for Atmel SAM E microcontroller series was added in OpenOCD release 0.10.0, which was added in Zephyr SDK 0.9.2. By default a factory new SAM E70 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 SAM E70 flash memory: - With the board power off, set a jumper on the J200 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 ======== #. 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 #. Connect the SAM E70 Xplained 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: sam_e70_xplained/same70q21 :goals: build flash You should see "Hello World! sam_e70_xplained" in your terminal. #. To use the SoC variation B IC, you need type "sam_e70_xplained/same70q21b". .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: sam_e70_xplained/same70q21b :goals: build flash You should see "Hello World! sam_e70_xplained" in your terminal. You can flash the image using an external debug adapter such as J-Link or ULINK, connected to the 20-pin JTAG header. Supply the name of the debug adapter (e.g., ``jlink``) via an OPENOCD_INTERFACE environment variable. OpenOCD will look for the appropriate interface configuration in an ``interface/$(OPENOCD_INTERFACE).cfg`` file on its internal search path. 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: sam_e70_xplained/same70q21 :maybe-skip-config: :goals: debug References ********** SAM E70 Product Page: path_to_url .. _SAME70-XPLD User Guide: path_to_url .. _OpenOCD tool: path_to_url .. _SAM-BA: path_to_url ```
/content/code_sandbox/boards/atmel/sam/sam_e70_xplained/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,618
```unknown /* */ #include <zephyr/dt-bindings/gpio/gpio.h> #include <zephyr/dt-bindings/gpio/st-morpho-header.h> / { st_morpho_header: st-morpho-header { compatible = "st-morpho-header"; #gpio-cells = <2>; gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>; gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>; gpio-map = <ST_MORPHO_L_1 0 &gpioc 10 0>, <ST_MORPHO_L_2 0 &gpioc 11 0>, <ST_MORPHO_L_3 0 &gpioc 12 0>, <ST_MORPHO_L_4 0 &gpiod 2 0>, <ST_MORPHO_L_13 0 &gpioa 13 0>, <ST_MORPHO_L_15 0 &gpioa 14 0>, <ST_MORPHO_L_17 0 &gpioa 15 0>, <ST_MORPHO_L_21 0 &gpiob 7 0>, <ST_MORPHO_L_23 0 &gpioc 13 0>, <ST_MORPHO_L_25 0 &gpioc 14 0>, <ST_MORPHO_L_27 0 &gpioc 15 0>, <ST_MORPHO_L_28 0 &gpioa 0 0>, <ST_MORPHO_L_29 0 &gpioh 0 0>, <ST_MORPHO_L_30 0 &gpioa 1 0>, <ST_MORPHO_L_31 0 &gpioh 1 0>, <ST_MORPHO_L_32 0 &gpioa 4 0>, <ST_MORPHO_L_34 0 &gpiob 0 0>, <ST_MORPHO_L_35 0 &gpioc 2 0>, <ST_MORPHO_L_36 0 &gpioc 1 0>, /* SB56=ON, SB46=OFF */ <ST_MORPHO_L_37 0 &gpioc 3 0>, <ST_MORPHO_L_38 0 &gpioc 0 0>, /* SB51=ON, SB52=OFF */ <ST_MORPHO_R_1 0 &gpioc 9 0>, <ST_MORPHO_R_2 0 &gpioc 8 0>, <ST_MORPHO_R_3 0 &gpiob 8 0>, <ST_MORPHO_R_4 0 &gpioc 6 0>, <ST_MORPHO_R_5 0 &gpiob 9 0>, <ST_MORPHO_R_6 0 &gpioc 5 0>, <ST_MORPHO_R_11 0 &gpioa 5 0>, <ST_MORPHO_R_12 0 &gpioa 12 0>, <ST_MORPHO_R_13 0 &gpioa 6 0>, <ST_MORPHO_R_14 0 &gpioa 11 0>, <ST_MORPHO_R_15 0 &gpioa 7 0>, <ST_MORPHO_R_16 0 &gpiob 12 0>, <ST_MORPHO_R_17 0 &gpiob 6 0>, <ST_MORPHO_R_19 0 &gpioc 7 0>, <ST_MORPHO_R_21 0 &gpioa 9 0>, <ST_MORPHO_R_22 0 &gpiob 2 0>, <ST_MORPHO_R_23 0 &gpioa 8 0>, <ST_MORPHO_R_24 0 &gpiob 1 0>, <ST_MORPHO_R_25 0 &gpiob 10 0>, <ST_MORPHO_R_26 0 &gpiob 15 0>, <ST_MORPHO_R_27 0 &gpiob 4 0>, <ST_MORPHO_R_28 0 &gpiob 14 0>, <ST_MORPHO_R_29 0 &gpiob 5 0>, <ST_MORPHO_R_30 0 &gpiob 13 0>, <ST_MORPHO_R_31 0 &gpiob 3 0>, <ST_MORPHO_R_33 0 &gpioa 10 0>, <ST_MORPHO_R_34 0 &gpioc 4 0>, <ST_MORPHO_R_35 0 &gpioa 2 0>, <ST_MORPHO_R_37 0 &gpioa 3 0>; }; }; ```
/content/code_sandbox/boards/st/nucleo_f446re/st_morpho_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,162
```unknown config BOARD_NUCLEO_F446RE select SOC_STM32F446XX ```
/content/code_sandbox/boards/st/nucleo_f446re/Kconfig.nucleo_f446re
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```cmake board_runner_args(jlink "--device=STM32F446RE" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_f446re/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
55
```yaml identifier: nucleo_f446re name: ST Nucleo F446RE type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools supported: - arduino_gpio - arduino_i2c - arduino_spi - counter - gpio - spi - i2c - can - backup_sram ram: 96 flash: 512 vendor: st ```
/content/code_sandbox/boards/st/nucleo_f446re/nucleo_f446re.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
113
```unknown # Enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y CONFIG_SERIAL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_f446re/nucleo_f446re_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
69
```restructuredtext .. _nucleo_l031k6_board: ST Nucleo L031K6 ################ Overview ******** The STM32 Nucleo-32 development board with STM32L031K6 MCU, supports Arduino Nano V3 connectivity. The STM32 Nucleo board provides an affordable, and flexible way for users to try out new concepts, and build prototypes with the STM32 microcontroller, choosing from the various combinations of performance, power consumption, and features. The Arduino* Nano V3 connectivity support allow easy functionality expansion of the STM32 Nucleo open development platform with a wide choice of specialized shields. The STM32 Nucleo board integrates the ST-LINK/V2-1 debugger and programmer. The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together with various packaged software examples. .. image:: img/nucleo_l031k6.jpg :align: center :alt: Nucleo L031K6 More information about the board can be found at the `Nucleo L031K6 website`_. Hardware ******** Nucleo L031K6 provides the following hardware components: - STM32 microcontroller in LQFP32 package - Extension resource: - Arduino* Nano V3 connectivity - On-board ST-LINK/V2-1 debugger/programmer with SWD connector: - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 - Flexible board power supply: - USB VBUS or external source (3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: - USB communication (LD1), user LED (LD2), power LED (LD3) - One push-button: RESET - USB re-enumeration capability. Three different interfaces supported on USB: - Virtual COM port - Mass storage - Debug port More information about STM32L031K6 can be found in the `STM32L0x1 reference manual`_ Supported Features ================== The Zephyr nucleo_l031k6 board configuration 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 | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | CLOCK | on-chip | reset and clock control | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c controller | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi controller | +-----------+------------+-------------------------------------+ | EEPROM | on-chip | eeprom | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported in this Zephyr port. The default configuration can be found in the defconfig file: :zephyr_file:`boards/st/nucleo_l031k6/nucleo_l031k6_defconfig` Connections and IOs =================== Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs. Default Zephyr Peripheral Mapping: ---------------------------------- - UART_2 TX/RX : PA2/PA15 (ST-Link Virtual Port Com) - I2C1 SCL/SDA : PA9/PA10 (Arduino I2C) - SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 (Arduino SPI) - LD2 : PB3 For more details please refer to `STM32 Nucleo-32 board User Manual`_. Programming and Debugging ************************* Applications for the ``nucleo_l031k6`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo L031K6 board includes an ST-LINK/V2-1 embedded debug tool interface. This interface is supported by the openocd version included in the Zephyr SDK. Flashing an application to Nucleo L031K6 ---------------------------------------- Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_l031k6 :goals: build flash You will see the LED blinking every second. 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: nucleo_l031k6 :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _Nucleo L031K6 website: path_to_url .. _STM32L0x1 reference manual: path_to_url .. _STM32 Nucleo-32 board User Manual: path_to_url ```
/content/code_sandbox/boards/st/nucleo_l031k6/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,223
```yaml board: name: nucleo_f446re vendor: st socs: - name: stm32f446xx ```
/content/code_sandbox/boards/st/nucleo_f446re/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown # STM32F446RE Nucleo board configuration if BOARD_NUCLEO_F446RE config SPI_STM32_INTERRUPT default y depends on SPI endif # BOARD_NUCLEO_F446RE ```
/content/code_sandbox/boards/st/nucleo_f446re/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
49
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 0 0>, /* A0 */ <1 0 &gpioa 1 0>, /* A1 */ <2 0 &gpioa 4 0>, /* A2 */ <3 0 &gpiob 0 0>, /* A3 */ <4 0 &gpioc 1 0>, /* A4 */ <5 0 &gpioc 0 0>, /* A5 */ <6 0 &gpioa 3 0>, /* D0 */ <7 0 &gpioa 2 0>, /* D1 */ <8 0 &gpioa 10 0>, /* D2 */ <9 0 &gpiob 3 0>, /* D3 */ <10 0 &gpiob 5 0>, /* D4 */ <11 0 &gpiob 4 0>, /* D5 */ <12 0 &gpiob 10 0>, /* D6 */ <13 0 &gpioa 8 0>, /* D7 */ <14 0 &gpioa 9 0>, /* D8 */ <15 0 &gpioc 7 0>, /* D9 */ <16 0 &gpiob 6 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; ```
/content/code_sandbox/boards/st/nucleo_f446re/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
492
```ini source [find board/st_nucleo_f4.cfg] $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/nucleo_f446re/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
70
```unknown /* * */ /dts-v1/; #include <st/f4/stm32f446Xe.dtsi> #include <st/f4/stm32f446r(c-e)tx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include "st_morpho_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32F446RE-NUCLEO board"; compatible = "st,stm32f446re-nucleo"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,canbus = &can2; }; leds: leds { compatible = "gpio-leds"; green_led_2: led_2 { gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; pwmleds { compatible = "pwm-leds"; green_pwm_led: green_pwm_led { pwms = <&pwm2 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_2; pwm-led0 = &green_pwm_led; sw0 = &user_button; }; }; &clk_lsi { status = "okay"; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { div-m = <8>; mul-n = <384>; div-p = <4>; div-q = <8>; clocks = <&clk_hse>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(96)>; ahb-prescaler = <1>; apb1-prescaler = <2>; apb2-prescaler = <1>; }; &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; pinctrl-names = "default"; status = "okay"; }; &timers2 { status = "okay"; pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa5>; pinctrl-names = "default"; }; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; }; &backup_sram { status = "okay"; }; &can1 { /* CAUTION: PB8 and PB9 may conflict with same pins of I2C1 */ pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; pinctrl-names = "default"; status = "okay"; }; &can2 { pinctrl-0 = <&can2_rx_pb12 &can2_tx_pb13>; pinctrl-names = "default"; status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; boot_partition: partition@0 { label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; read-only; }; /* * The flash starting at 0x00010000 and ending at * 0x0001ffff (sectors 16-31) is reserved for use * by the application. */ storage_partition: partition@10000 { label = "storage"; reg = <0x00010000 DT_SIZE_K(64)>; }; slot0_partition: partition@20000 { label = "image-0"; reg = <0x00020000 DT_SIZE_K(128)>; }; slot1_partition: partition@40000 { label = "image-1"; reg = <0x00040000 DT_SIZE_K(128)>; }; scratch_partition: partition@60000 { label = "image-scratch"; reg = <0x00060000 DT_SIZE_K(128)>; }; }; }; ```
/content/code_sandbox/boards/st/nucleo_f446re/nucleo_f446re.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,319
```unknown /* */ #include <zephyr/dt-bindings/gpio/gpio.h> #include <zephyr/dt-bindings/gpio/st-morpho-header.h> / { st_morpho_header: st-morpho-header { compatible = "st-morpho-header"; #gpio-cells = <2>; gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>; gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>; gpio-map = <ST_MORPHO_L_1 0 &gpioc 10 0>, <ST_MORPHO_L_2 0 &gpioc 11 0>, <ST_MORPHO_L_3 0 &gpioc 12 0>, <ST_MORPHO_L_4 0 &gpiod 2 0>, <ST_MORPHO_L_7 0 &gpioa 14 0>, <ST_MORPHO_L_9 0 &gpiod 0>, <ST_MORPHO_L_10 0 &gpiod 1>, <ST_MORPHO_L_11 0 &gpiod 3>, <ST_MORPHO_L_13 0 &gpioa 13 0>, <ST_MORPHO_L_15 0 &gpiod 4 0>, <ST_MORPHO_L_17 0 &gpioa 15 0>, <ST_MORPHO_L_21 0 &gpiob 7 0>, <ST_MORPHO_L_23 0 &gpioc 13 0>, <ST_MORPHO_L_25 0 &gpioc 14 0>, /* SB23=ON, R31=OFF */ <ST_MORPHO_L_26 0 &gpiod 5 0>, <ST_MORPHO_L_27 0 &gpioc 15 0>, /* SB24=ON, R32=OFF */ <ST_MORPHO_L_28 0 &gpioa 0 0>, <ST_MORPHO_L_29 0 &gpiof 0 0>, <ST_MORPHO_L_30 0 &gpioa 1 0>, <ST_MORPHO_L_31 0 &gpiof 1 0>, <ST_MORPHO_L_32 0 &gpioa 4 0>, <ST_MORPHO_L_34 0 &gpiob 1 0>, <ST_MORPHO_L_35 0 &gpioc 2 0>, <ST_MORPHO_L_36 0 &gpiob 11 0>, /* SB4=ON, SB2=OFF */ <ST_MORPHO_L_37 0 &gpioc 3 0>, <ST_MORPHO_L_38 0 &gpiob 12 0>, /* SB3=ON, SB5=OFF */ <ST_MORPHO_R_1 0 &gpioc 9 0>, <ST_MORPHO_R_2 0 &gpioc 8 0>, <ST_MORPHO_R_3 0 &gpiob 8 0>, <ST_MORPHO_R_4 0 &gpioc 6 0>, <ST_MORPHO_R_5 0 &gpiob 9 0>, <ST_MORPHO_R_6 0 &gpioa 3 0>, <ST_MORPHO_R_10 0 &gpiod 6 0>, <ST_MORPHO_R_11 0 &gpioa 5 0>, <ST_MORPHO_R_12 0 &gpioa 12 0>, <ST_MORPHO_R_13 0 &gpioa 6 0>, <ST_MORPHO_R_14 0 &gpioa 11 0>, <ST_MORPHO_R_15 0 &gpioa 7 0>, <ST_MORPHO_R_16 0 &gpioc 1 0>, <ST_MORPHO_R_17 0 &gpiob 0 0>, <ST_MORPHO_R_18 0 &gpioc 0 0>, <ST_MORPHO_R_19 0 &gpioc 7 0>, <ST_MORPHO_R_21 0 &gpioa 9 0>, <ST_MORPHO_R_22 0 &gpiob 2 0>, <ST_MORPHO_R_23 0 &gpioa 8 0>, <ST_MORPHO_R_24 0 &gpiob 6 0>, <ST_MORPHO_R_25 0 &gpiob 14 0>, <ST_MORPHO_R_26 0 &gpiob 15 0>, <ST_MORPHO_R_27 0 &gpiob 4 0>, <ST_MORPHO_R_28 0 &gpiob 10 0>, <ST_MORPHO_R_29 0 &gpiob 5 0>, <ST_MORPHO_R_30 0 &gpiob 13 0>, <ST_MORPHO_R_31 0 &gpiob 3 0>, <ST_MORPHO_R_33 0 &gpioa 10 0>, <ST_MORPHO_R_34 0 &gpioa 2 0>, <ST_MORPHO_R_35 0 &gpioc 4 0>, <ST_MORPHO_R_36 0 &gpiod 8 0>, <ST_MORPHO_R_37 0 &gpioc 5 0>, <ST_MORPHO_R_38 0 &gpiod 9 0>; }; }; ```
/content/code_sandbox/boards/st/nucleo_g070rb/st_morpho_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,367
```cmake board_runner_args(pyocd "--target=stm32g070rbtx") board_runner_args(pyocd "--flash-opt=-O reset_type=hw") board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset") board_runner_args(jlink "--device=STM32G070RB" "--speed=4000") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_g070rb/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
165
```unknown /* * */ /dts-v1/; #include <st/g0/stm32g070Xb.dtsi> #include <st/g0/stm32g070rbtx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include "st_morpho_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32G070RB-NUCLEO board"; compatible = "st,stm32g070rb-nucleo"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds: leds { compatible = "gpio-leds"; green_led_1: led_4 { gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; label = "User LD4"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_1; sw0 = &user_button; watchdog0 = &iwdg; die-temp0 = &die_temp; volt-sensor0 = &vref; }; }; &clk_lsi { status = "okay"; }; &clk_hsi { status = "okay"; }; &pll { div-m = <1>; mul-n = <8>; div-p = <2>; div-r = <2>; clocks = <&clk_hsi>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(64)>; ahb-prescaler = <1>; apb1-prescaler = <1>; }; &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000400>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; }; &iwdg { status = "okay"; }; &timers3 { st,prescaler = <10000>; status = "okay"; pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6>; pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 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"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1>; pinctrl-names = "default"; st,adc-clock-source = <SYNC>; st,adc-prescaler = <4>; status = "okay"; vref-mv = <3300>; }; &die_temp { status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* Set 2KB of storage at the end of 128KB flash */ storage_partition: partition@1f800 { label = "storage"; reg = <0x0001f800 DT_SIZE_K(2)>; }; }; }; &vref { status = "okay"; }; ```
/content/code_sandbox/boards/st/nucleo_g070rb/nucleo_g070rb.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,057
```restructuredtext .. _nucleo_f446re_board: ST Nucleo F446RE ################ Overview ******** The Nucleo F446RE board features an ARM Cortex-M4 based STM32F446RE MCU with a wide range of connectivity support and configurations. Here are some highlights of the Nucleo F446RE board: - STM32 microcontroller in QFP64 package - Two types of extension resources: - Arduino Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - On-board ST-LINK/V2-1 debugger/programmer with SWD connector - Flexible board power supply: - USB VBUS or external source(3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: USB communication (LD1), user LED (LD2), power LED (LD3) - Two push-buttons: USER and RESET .. image:: img/nucleo_f446re.jpg :align: center :alt: Nucleo F446RE More information about the board can be found at the `Nucleo F446RE website`_. Hardware ******** Nucleo F446RE provides the following hardware components: - STM32F446RET6 in LQFP64 package - ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU - Adaptive real-time accelerator (ART Accelerator) - 180 MHz max CPU frequency - VDD from 1.7 V to 3.6 V - 512 KB Flash - 128 KB SRAM - 10 General purpose timers - 2 Advanced control timers - 2 basic timers - SPI(4) - I2C(3) - USART(4) - UART(2) - USB OTG Full Speed and High Speed - CAN(2) - SAI(2) - SPDIF_Rx(1) - HDMI_CEC(1) - Quad SPI(1) - Camera Interface - GPIO(50) with external interrupt capability - 12-bit ADC(3) with 16 channels - 12-bit DAC with 2 channels More information about STM32F446RE can be found here: - `STM32F446RE on www.st.com`_ - `STM32F446 reference manual`_ Supported Features ================== The Zephyr nucleo_f446re board configuration supports the following hardware features: +-------------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +=============+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-------------+------------+-------------------------------------+ | UART | on-chip | serial port | +-------------+------------+-------------------------------------+ | PINMUX | on-chip | pinmux | +-------------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-------------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-------------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-------------+------------+-------------------------------------+ | Backup SRAM | on-chip | Backup SRAM | +-------------+------------+-------------------------------------+ | CAN 1/2 | on-chip | Controller Area Network | +-------------+------------+-------------------------------------+ Other hardware features are not yet supported on this Zephyr port. The default configuration can be found in :zephyr_file:`boards/st/nucleo_f446re/nucleo_f446re_defconfig` Connections and IOs =================== Nucleo F446RE Board has 8 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. Available pins: --------------- .. image:: img/nucleo_f446re_arduino_top_left.jpg :align: center :alt: Nucleo F446RE Arduino connectors (top left) .. image:: img/nucleo_f446re_arduino_top_right.jpg :align: center :alt: Nucleo F446RE Arduino connectors (top right) .. image:: img/nucleo_f446re_morpho_top_left.jpg :align: center :alt: Nucleo F446RE Morpho connectors (top left) .. image:: img/nucleo_f446re_morpho_top_right.jpg :align: center :alt: Nucleo F446RE Morpho connectors (top right) For more details please refer to `STM32 Nucleo-64 board User Manual`_. Default Zephyr Peripheral Mapping: ---------------------------------- - UART_1_TX : PB6 - UART_1_RX : PB7 - UART_2_TX : PA2 - UART_2_RX : PA3 - USER_PB : PC13 - LD2 : PA5 - I2C1_SDA : PB9 - I2C1_SCL : PB8 - I2C2_SDA : PB3 - I2C2_SCL : PB10 - I2C3_SDA : PB4 - I2C3_SCL : PA8 System Clock ------------ Nucleo F446RE System Clock could be driven by an internal or external oscillator, as well as the main PLL clock. By default, the System clock is driven by the PLL clock at 84MHz, driven by an 8MHz high-speed external clock. Serial Port ----------- Nucleo F446RE board has 2 UARTs and 4 USARTs. The Zephyr console output is assigned to UART2. Default settings are 115200 8N1. Backup SRAM ----------- In order to test backup SRAM you may want to disconnect VBAT from VDD. You can do it by removing ``SB45`` jumper on the back side of the board. Controller Area Network ----------------------- The TX/RX wires connected with D14/D15 of CN5 connector. Thus the board can be used with `RS485 CAN Shield`_. Programming and Debugging ************************* Applications for the ``nucleo_f446re`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo F446RE board includes an ST-LINK/V2-1 embedded debug tool interface. This interface is supported by the openocd version included in the Zephyr SDK. Flashing an application to Nucleo F446RE ---------------------------------------- Here is an example for the :ref:`hello_world` application. Run a serial host program to connect with your Nucleo board. .. code-block:: console $ minicom -b 115200 -D /dev/ttyACM0 Build and flash the application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_f446re :goals: build flash You should see the following message on the console: .. code-block:: console $ Hello World! arm 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: nucleo_f446re :maybe-skip-config: :goals: debug .. _Nucleo F446RE website: path_to_url .. _STM32 Nucleo-64 board User Manual: path_to_url .. _STM32F446RE on www.st.com: path_to_url .. _STM32F446 reference manual: path_to_url .. _RS485 CAN Shield: path_to_url ```
/content/code_sandbox/boards/st/nucleo_f446re/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,695
```unknown # Enable MPU CONFIG_ARM_MPU=y # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # GPIO Controller CONFIG_GPIO=y # Enables clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_g070rb/nucleo_g070rb_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
66
```yaml board: name: nucleo_g070rb vendor: st socs: - name: stm32g070xx ```
/content/code_sandbox/boards/st/nucleo_g070rb/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown config BOARD_NUCLEO_G070RB select SOC_STM32G070XX ```
/content/code_sandbox/boards/st/nucleo_g070rb/Kconfig.nucleo_g070rb
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 0 0>, /* A0 */ <1 0 &gpioa 1 0>, /* A1 */ <2 0 &gpioa 4 0>, /* A2 */ <3 0 &gpiob 1 0>, /* A3 */ <4 0 &gpiob 11 0>, /* A4 */ <5 0 &gpiob 12 0>, /* A5 */ <6 0 &gpioc 5 0>, /* D0 */ <7 0 &gpioc 4 0>, /* D1 */ <8 0 &gpioa 10 0>, /* D2 */ <9 0 &gpiob 3 0>, /* D3 */ <10 0 &gpiob 5 0>, /* D4 */ <11 0 &gpiob 4 0>, /* D5 */ <12 0 &gpiob 14 0>, /* D6 */ <13 0 &gpioa 8 0>, /* D7 */ <14 0 &gpioa 9 0>, /* D8 */ <15 0 &gpioc 7 0>, /* D9 */ <16 0 &gpiob 0 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; arduino_serial: &usart1 {}; ```
/content/code_sandbox/boards/st/nucleo_g070rb/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
502
```yaml identifier: nucleo_g070rb name: ST Nucleo G070RB type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 36 flash: 128 supported: - arduino_gpio - arduino_i2c - arduino_spi - arduino_serial - uart - gpio - i2c - spi - counter - watchdog - pwm - adc - nvs vendor: st ```
/content/code_sandbox/boards/st/nucleo_g070rb/nucleo_g070rb.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
130
```ini source [find interface/stlink.cfg] transport select hla_swd source [find target/stm32g0x.cfg] reset_config srst_only ```
/content/code_sandbox/boards/st/nucleo_g070rb/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
34
```unknown /* */ #include <zephyr/dt-bindings/gpio/gpio.h> #include <zephyr/dt-bindings/gpio/st-morpho-header.h> / { st_morpho_header: st-morpho-header { compatible = "st-morpho-header"; #gpio-cells = <2>; gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>; gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>; gpio-map = <ST_MORPHO_L_1 0 &gpioc 10 0>, <ST_MORPHO_L_2 0 &gpioc 11 0>, <ST_MORPHO_L_3 0 &gpioc 12 0>, <ST_MORPHO_L_4 0 &gpiod 2 0>, <ST_MORPHO_L_7 0 &gpioa 14 0>, <ST_MORPHO_L_9 0 &gpiod 0>, <ST_MORPHO_L_10 0 &gpiod 1>, <ST_MORPHO_L_11 0 &gpiod 3>, <ST_MORPHO_L_13 0 &gpioa 13 0>, <ST_MORPHO_L_15 0 &gpiod 4 0>, <ST_MORPHO_L_17 0 &gpioa 15 0>, <ST_MORPHO_L_21 0 &gpiob 7 0>, <ST_MORPHO_L_23 0 &gpioc 13 0>, <ST_MORPHO_L_25 0 &gpioc 14 0>, /* SB23=ON, R31=OFF */ <ST_MORPHO_L_26 0 &gpiod 5 0>, <ST_MORPHO_L_27 0 &gpioc 15 0>, /* SB24=ON, R32=OFF */ <ST_MORPHO_L_28 0 &gpioa 0 0>, <ST_MORPHO_L_29 0 &gpiof 0 0>, <ST_MORPHO_L_30 0 &gpioa 1 0>, <ST_MORPHO_L_31 0 &gpiof 1 0>, <ST_MORPHO_L_32 0 &gpioa 4 0>, <ST_MORPHO_L_34 0 &gpiob 1 0>, <ST_MORPHO_L_35 0 &gpioc 2 0>, <ST_MORPHO_L_36 0 &gpiob 11 0>, /* SB4=ON, SB2=OFF */ <ST_MORPHO_L_37 0 &gpioc 3 0>, <ST_MORPHO_L_38 0 &gpiob 12 0>, /* SB3=ON, SB5=OFF */ <ST_MORPHO_R_1 0 &gpioc 9 0>, <ST_MORPHO_R_2 0 &gpioc 8 0>, <ST_MORPHO_R_3 0 &gpiob 8 0>, <ST_MORPHO_R_4 0 &gpioc 6 0>, <ST_MORPHO_R_5 0 &gpiob 9 0>, <ST_MORPHO_R_6 0 &gpioa 3 0>, <ST_MORPHO_R_10 0 &gpiod 6 0>, <ST_MORPHO_R_11 0 &gpioa 5 0>, <ST_MORPHO_R_12 0 &gpioa 12 0>, <ST_MORPHO_R_13 0 &gpioa 6 0>, <ST_MORPHO_R_14 0 &gpioa 11 0>, <ST_MORPHO_R_15 0 &gpioa 7 0>, <ST_MORPHO_R_16 0 &gpioc 1 0>, <ST_MORPHO_R_17 0 &gpiob 0 0>, <ST_MORPHO_R_18 0 &gpioc 0 0>, <ST_MORPHO_R_19 0 &gpioc 7 0>, <ST_MORPHO_R_21 0 &gpioa 9 0>, <ST_MORPHO_R_22 0 &gpiob 2 0>, <ST_MORPHO_R_23 0 &gpioa 8 0>, <ST_MORPHO_R_24 0 &gpiob 6 0>, <ST_MORPHO_R_25 0 &gpiob 14 0>, <ST_MORPHO_R_26 0 &gpiob 15 0>, <ST_MORPHO_R_27 0 &gpiob 4 0>, <ST_MORPHO_R_28 0 &gpiob 10 0>, <ST_MORPHO_R_29 0 &gpiob 5 0>, <ST_MORPHO_R_30 0 &gpiob 13 0>, <ST_MORPHO_R_31 0 &gpiob 3 0>, <ST_MORPHO_R_33 0 &gpioa 10 0>, <ST_MORPHO_R_34 0 &gpioa 2 0>, <ST_MORPHO_R_35 0 &gpioc 4 0>, <ST_MORPHO_R_36 0 &gpiod 8 0>, <ST_MORPHO_R_37 0 &gpioc 5 0>, <ST_MORPHO_R_38 0 &gpiod 9 0>; }; }; ```
/content/code_sandbox/boards/st/nucleo_g071rb/st_morpho_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,367
```cmake board_runner_args(pyocd "--target=stm32g071rbtx") board_runner_args(pyocd "--flash-opt=-O reset_type=hw") board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset") board_runner_args(jlink "--device=STM32G071RB" "--speed=4000") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_g071rb/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
165
```restructuredtext .. _nucleo_g070rb_board: ST Nucleo G070RB ################ Overview ******** The Nucleo G070RB board features an ARM Cortex-M0+ based STM32G070RB MCU with a wide range of connectivity support and configurations. Here are some highlights of the Nucleo G070RB board: - STM32 microcontroller in QFP64 package - Two types of extension resources: - Arduino Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - On-board ST-LINK/V2-1 debugger/programmer with SWD connector - Flexible board power supply: - USB VBUS or external source(3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: USB communication (LD1), user LED (LD4), power LED (LD3) - Two push-buttons: USER and RESET .. image:: img/nucleo_g070rb.jpg :align: center :alt: Nucleo G070RB More information about the board can be found at the `Nucleo G070RB website`_. Hardware ******** Nucleo G070RB provides the following hardware components: - STM32 microcontroller in LQFP64 package - Two types of extension resources: - Arduino* Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - ARM* mbed* - On-board ST-LINK/V2-1 debugger/programmer with SWD connector: - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 - Flexible board power supply: - USB VBUS or external source (3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: - USB communication (LD1), user LED (LD4), power LED (LD3) - Two push-buttons: USER and RESET - USB re-enumeration capability. Three different interfaces supported on USB: - Virtual COM port - Mass storage - Debug port - Support of wide choice of Integrated Development Environments (IDEs) including: - IAR - ARM Keil - GCC-based IDEs More information about STM32G070RB can be found here: - `G070RB on www.st.com`_ Supported Features ================== The Zephyr nucleo_g070rb board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | MPU | on-chip | arm memory protection unit | +-----------+------------+-------------------------------------+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port-polling; | | | | serial port-interrupt | +-----------+------------+-------------------------------------+ | PINMUX | on-chip | pinmux | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | CLOCK | on-chip | reset and clock control | +-----------+------------+-------------------------------------+ | FLASH | on-chip | flash memory | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | rtc | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | independent watchdog | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ | die-temp | on-chip | die temperature sensor | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported in this Zephyr port. The default configuration can be found in the defconfig file: :zephyr_file:`boards/st/nucleo_g070rb/nucleo_g070rb_defconfig` Connections and IOs =================== Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs. Default Zephyr Peripheral Mapping: ---------------------------------- - UART_1 TX/RX : PC4/PC5 - UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) - I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) - I2C2 SCL/SDA : PA11/PA12 - SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI) - SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15 - USER_PB : PC13 - LD4 : PA5 - PWM : PA6 - ADC1 IN0 : PA0 - ADC1 IN1 : PA1 - DAC1_OUT1 : PA4 For more details please refer to `STM32 Nucleo-64 board User Manual`_. Programming and Debugging ************************* Applications for the ``nucleo_g070rb`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo G070RB board includes an ST-LINK/V2-1 embedded debug tool interface. Flashing an application to Nucleo G070RB ---------------------------------------- Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_g070rb :goals: build flash You will see the LED blinking every second. 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: nucleo_g070rb :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _Nucleo G070RB website: path_to_url .. _STM32 Nucleo-64 board User Manual: path_to_url .. _G070RB on www.st.com: path_to_url ```
/content/code_sandbox/boards/st/nucleo_g070rb/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,510
```yaml identifier: nucleo_g071rb name: ST Nucleo G071RB type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 36 flash: 128 supported: - arduino_gpio - arduino_i2c - arduino_spi - arduino_serial - uart - gpio - i2c - spi - counter - watchdog - pwm - adc - dac - dma - lptim - nvs - rtc vendor: st ```
/content/code_sandbox/boards/st/nucleo_g071rb/nucleo_g071rb.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
148
```unknown config BOARD_NUCLEO_G071RB select SOC_STM32G071XX ```
/content/code_sandbox/boards/st/nucleo_g071rb/Kconfig.nucleo_g071rb
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```yaml board: name: nucleo_g071rb vendor: st socs: - name: stm32g071xx ```
/content/code_sandbox/boards/st/nucleo_g071rb/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown /* * */ /dts-v1/; #include <st/g0/stm32g071Xb.dtsi> #include <st/g0/stm32g071r(6-8-b)tx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include "st_morpho_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32G071RB-NUCLEO board"; compatible = "st,stm32g071rb-nucleo"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds: leds { compatible = "gpio-leds"; green_led_1: led_4 { gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; label = "User LD4"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_1; sw0 = &user_button; watchdog0 = &iwdg; die-temp0 = &die_temp; volt-sensor0 = &vref; volt-sensor1 = &vbat; }; }; &clk_lsi { status = "okay"; }; &clk_hsi { status = "okay"; }; &pll { div-m = <1>; mul-n = <8>; div-p = <2>; div-q = <2>; div-r = <2>; clocks = <&clk_hsi>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(64)>; ahb-prescaler = <1>; apb1-prescaler = <1>; }; &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000400>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; backup_regs { status = "okay"; }; }; &iwdg { status = "okay"; }; &timers3 { st,prescaler = <10000>; status = "okay"; pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6>; pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 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"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1>; pinctrl-names = "default"; st,adc-clock-source = <ASYNC>; st,adc-prescaler = <4>; status = "okay"; vref-mv = <3300>; }; &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; pinctrl-names = "default"; }; &die_temp { status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* Set 2KB of storage at the end of 128KB flash */ storage_partition: partition@1f800 { label = "storage"; reg = <0x0001f800 DT_SIZE_K(2)>; }; }; }; stm32_lp_tick_source: &lptim1 { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>, <&rcc STM32_SRC_LSI LPTIM1_SEL(1)>; status = "okay"; }; &vref { status = "okay"; }; &vbat { status = "okay"; }; ```
/content/code_sandbox/boards/st/nucleo_g071rb/nucleo_g071rb.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,193
```unknown # Enable MPU CONFIG_ARM_MPU=y # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # GPIO Controller CONFIG_GPIO=y # Enables clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_g071rb/nucleo_g071rb_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
66
```ini source [find interface/stlink.cfg] transport select hla_swd source [find target/stm32g0x.cfg] reset_config srst_only ```
/content/code_sandbox/boards/st/nucleo_g071rb/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
34
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 0 0>, /* A0 */ <1 0 &gpioa 1 0>, /* A1 */ <2 0 &gpioa 4 0>, /* A2 */ <3 0 &gpiob 1 0>, /* A3 */ <4 0 &gpiob 11 0>, /* A4 */ <5 0 &gpiob 12 0>, /* A5 */ <6 0 &gpioc 5 0>, /* D0 */ <7 0 &gpioc 4 0>, /* D1 */ <8 0 &gpioa 10 0>, /* D2 */ <9 0 &gpiob 3 0>, /* D3 */ <10 0 &gpiob 5 0>, /* D4 */ <11 0 &gpiob 4 0>, /* D5 */ <12 0 &gpiob 14 0>, /* D6 */ <13 0 &gpioa 8 0>, /* D7 */ <14 0 &gpioa 9 0>, /* D8 */ <15 0 &gpioc 7 0>, /* D9 */ <16 0 &gpiob 0 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; arduino_serial: &usart1 {}; ```
/content/code_sandbox/boards/st/nucleo_g071rb/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
502
```cmake board_runner_args(jlink "--device=STM32H7A3ZI" "--speed=4000") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") board_runner_args(openocd --target-handle=_CHIPNAME.cpu0) include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
118
```unknown /* * */ /dts-v1/; #include <st/h7/stm32h7a3Xi.dtsi> #include <st/h7/stm32h7a3z(g-i)txq-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32H7A3ZI-Q-NUCLEO board"; compatible = "st,stm32h7a3zi-q-nucleo"; chosen { zephyr,console = &usart3; zephyr,shell-uart = &usart3; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,dtcm = &dtcm; zephyr,itcm = &itcm; }; leds: leds { compatible = "gpio-leds"; green_led: led_0 { gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>; label = "User LD1"; }; yellow_led: led_1 { gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; pwmleds { compatible = "pwm-leds"; red_pwm_led: red_pwm_led { pwms = <&pwm12 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button_0 { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led; led1 = &yellow_led; pwm-led0 = &red_pwm_led; sw0 = &user_button; }; }; &clk_hsi48 { status = "okay"; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { div-m = <1>; mul-n = <35>; div-p = <1>; div-q = <5>; div-r = <2>; clocks = <&clk_hse>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(280)>; d1cpre = <1>; hpre = <1>; d1ppre = <2>; d2ppre1 = <2>; d2ppre2 = <2>; d3ppre = <2>; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &backup_sram { status = "okay"; }; &timers12 { st,prescaler = <10000>; status = "okay"; pwm12: pwm { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&tim12_ch1_pb14>; }; }; &adc1 { pinctrl-0 = <&adc1_inp15_pa3>; pinctrl-names = "default"; st,adc-clock-source = <SYNC>; st,adc-prescaler = <4>; status = "okay"; }; zephyr_udc0: &usbotg_hs { pinctrl-0 = <&usb_otg_hs_dm_pa11 &usb_otg_hs_dp_pa12>; pinctrl-names = "default"; status = "okay"; }; &rng { status = "okay"; }; ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/nucleo_h7a3zi_q.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
830
```restructuredtext .. _nucleo_g071rb_board: ST Nucleo G071RB ################ Overview ******** The Nucleo G071RB board features an ARM Cortex-M0+ based STM32G071RB MCU with a wide range of connectivity support and configurations. Here are some highlights of the Nucleo G071RB board: - STM32 microcontroller in QFP64 package - Two types of extension resources: - Arduino Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - On-board ST-LINK/V2-1 debugger/programmer with SWD connector - Flexible board power supply: - USB VBUS or external source(3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: USB communication (LD1), user LED (LD4), power LED (LD3) - Two push-buttons: USER and RESET .. image:: img/nucleo_g071rb.jpg :align: center :alt: Nucleo G071RB More information about the board can be found at the `Nucleo G071RB website`_. Hardware ******** Nucleo G071RB provides the following hardware components: - STM32 microcontroller in LQFP64 package - Two types of extension resources: - Arduino* Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - ARM* mbed* - On-board ST-LINK/V2-1 debugger/programmer with SWD connector: - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 - Flexible board power supply: - USB VBUS or external source (3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: - USB communication (LD1), user LED (LD4), power LED (LD3) - Two push-buttons: USER and RESET - USB re-enumeration capability. Three different interfaces supported on USB: - Virtual COM port - Mass storage - Debug port - Support of wide choice of Integrated Development Environments (IDEs) including: - IAR - ARM Keil - GCC-based IDEs More information about STM32G071RB can be found here: - `G071RB on www.st.com`_ - `STM32G071 reference manual`_ Supported Features ================== The Zephyr nucleo_g071rb board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | MPU | on-chip | arm memory protection unit | +-----------+------------+-------------------------------------+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port-polling; | | | | serial port-interrupt | +-----------+------------+-------------------------------------+ | PINMUX | on-chip | pinmux | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | CLOCK | on-chip | reset and clock control | +-----------+------------+-------------------------------------+ | FLASH | on-chip | flash memory | +-----------+------------+-------------------------------------+ | COUNTER | on-chip | rtc | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | independent watchdog | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ | DAC | on-chip | dac | +-----------+------------+-------------------------------------+ | die-temp | on-chip | die temperature sensor | +-----------+------------+-------------------------------------+ | RTC | on-chip | rtc | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported in this Zephyr port. The default configuration can be found in the defconfig file: :zephyr_file:`boards/st/nucleo_g071rb/nucleo_g071rb_defconfig` Connections and IOs =================== Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs. Default Zephyr Peripheral Mapping: ---------------------------------- - UART_1 TX/RX : PC4/PC5 - UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) - I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) - I2C2 SCL/SDA : PA11/PA12 - SPI1 NSS/SCK/MISO/MOSI : PB0/PA5/PA6/PA7 (Arduino SPI) - SPI2 NSS/SCK/MISO/MOSI : PB12/PB13/PB14/PB15 - USER_PB : PC13 - LD4 : PA5 - PWM : PA6 - ADC1 IN0 : PA0 - ADC1 IN1 : PA1 - DAC1_OUT1 : PA4 For more details please refer to `STM32 Nucleo-64 board User Manual`_. Programming and Debugging ************************* Applications for the ``nucleo_g071rb`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo G071RB board includes an ST-LINK/V3 embedded debug tool interface. Flashing an application to Nucleo G071RB ---------------------------------------- Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_g071rb :goals: build flash You will see the LED blinking every second. 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: nucleo_g071rb :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _Nucleo G071RB website: path_to_url .. _STM32G071 reference manual: path_to_url .. _STM32 Nucleo-64 board User Manual: path_to_url .. _G071RB on www.st.com: path_to_url ```
/content/code_sandbox/boards/st/nucleo_g071rb/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,573
```unknown config BOARD_NUCLEO_H7A3ZI_Q select SOC_STM32H7A3XXQ ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/Kconfig.nucleo_h7a3zi_q
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
28
```yaml identifier: nucleo_h7a3zi_q name: ST Nucleo H7A3ZI-Q type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 1280 flash: 2048 supported: - arduino_gpio - uart - gpio - pwm - adc - backup_sram vendor: st ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/nucleo_h7a3zi_q.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
102
```yaml board: name: nucleo_h7a3zi_q vendor: st socs: - name: stm32h7a3xx ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
36
```unknown # STM32H7A3ZI-Q Nucleo board configuration if BOARD_NUCLEO_H7A3ZI_Q config USB_DC_HAS_HS_SUPPORT default y depends on USB_DC_STM32 endif # BOARD_NUCLEO_H7A3ZI_Q ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
65
```unknown # Enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y # Enable UART CONFIG_SERIAL=y # Console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # Enable Pinctrl CONFIG_PINCTRL=y # Enable GPIO CONFIG_GPIO=y # Enable clocks CONFIG_CLOCK_CONTROL=y # Enable SMPS CONFIG_POWER_SUPPLY_DIRECT_SMPS=y ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/nucleo_h7a3zi_q_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
86
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 3 0>, /* A0 */ <1 0 &gpioc 0 0>, /* A1 */ <2 0 &gpioc 3 0>, /* A2 */ <3 0 &gpiob 1 0>, /* A3 */ <4 0 &gpioc 2 0>, /* A4 */ <5 0 &gpiof 11 0>, /* A5 */ <6 0 &gpiob 7 0>, /* D0 */ <7 0 &gpiob 6 0>, /* D1 */ <8 0 &gpiog 14 0>, /* D2 */ <9 0 &gpioe 13 0>, /* D3 */ <10 0 &gpioe 14 0>, /* D4 */ <11 0 &gpioe 11 0>, /* D5 */ <12 0 &gpioa 8 0>, /* D6 */ <13 0 &gpiog 12 0>, /* D7 */ <14 0 &gpiog 9 0>, /* D8 */ <15 0 &gpiod 15 0>, /* D9 */ <16 0 &gpiod 14 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
476
```ini source [find interface/stlink-dap.cfg] transport select dapdirect_swd set WORKAREASIZE 0x3000 set CHIPNAME STM32H7A3ZI set BOARDNAME NUCLEO-H7A3ZI_Q source [find target/stm32h7x.cfg] # Use connect_assert_srst here to be able to program # even when core is in sleep mode reset_config srst_only srst_nogate connect_assert_srst $_CHIPNAME.cpu0 configure -event gdb-attach { echo "Debugger attaching: halting execution" gdb_breakpoint_override hard } $_CHIPNAME.cpu0 configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } # Due to the use of connect_assert_srst, running gdb requires # to reset halt just after openocd init. rename init old_init proc init {} { old_init reset halt } ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
206
```unknown /* * */ / { aliases { magn0 = &lsm303agr_magn; accel0 = &lsm303agr_accel; }; }; &i2c1 { /delete-node/ lsm303dlhc-magn@1e; /delete-node/ lsm303dlhc-accel@19; lsm303agr_magn: lsm303agr-magn@1e { compatible = "st,lis2mdl", "st,lsm303agr-magn"; reg = <0x1e>; }; lsm303agr_accel: lsm303agr-accel@19 { compatible = "st,lis2dh", "st,lsm303agr-accel"; reg = <0x19>; irq-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>, <&gpioe 5 GPIO_ACTIVE_HIGH>; }; }; &spi1 { cs-gpios = <&gpioe 3 GPIO_ACTIVE_LOW>; i3g4250d@0 { compatible = "st,i3g4250d"; reg = <0>; spi-max-frequency = <1000000>; }; }; ```
/content/code_sandbox/boards/st/stm32f3_disco/stm32f3_disco_stm32f303xc_E.overlay
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
253
```yaml identifier: stm32f3_disco@E name: ST STM32F3 Discovery rev E type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 40 supported: - gpio - i2c - counter - spi - watchdog - usb_device - i3g4250d - nvs - can - pwm - adc - dac - rtc - usbd vendor: st ```
/content/code_sandbox/boards/st/stm32f3_disco/stm32f3_disco_stm32f303xc_E.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
130
```cmake board_runner_args(jlink "--device=STM32F303VC" "--speed=4000") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) ```
/content/code_sandbox/boards/st/stm32f3_disco/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
100
```yaml board: name: stm32f3_disco vendor: st revision: format: letter default: "B" revisions: - name: "B" - name: "E" socs: - name: stm32f303xc ```
/content/code_sandbox/boards/st/stm32f3_disco/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
63
```unknown config BOARD_STM32F3_DISCO select SOC_STM32F303XC ```
/content/code_sandbox/boards/st/stm32f3_disco/Kconfig.stm32f3_disco
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
21
```restructuredtext .. _nucleo_h7a3zi_q_board: ST Nucleo H7A3ZI-Q ################## Overview ******** The STM32 Nucleo-144 boards offer combinations of performance and power that provide an affordable and flexible way for users to build prototypes and try out new concepts. For compatible boards, the SMPS (Switched-Mode Power Supply) significantly reduces power consumption in Run mode. The Arduino-compatible ST Zio connector expands functionality of the Nucleo open development platform, with a wide choice of specialized Arduino* Uno V3 shields. The STM32 Nucleo-144 board does not require any separate probe as it integrates the ST-LINK/V3E debugger/programmer. The STM32 Nucleo-144 board comes with the STM32 comprehensive free software libraries and examples available with the STM32Cube MCU Package. Key Features - STM32 microcontroller in LQFP144 package - USB OTG or full-speed device (depending on STM32 support) - 3 user LEDs - 2 user and reset push-buttons - 32.768 kHz crystal oscillator - Board connectors: - USB with Micro-AB - SWD - ST Zio connector including Arduino* Uno V3 - ST morpho - Flexible power-supply options: ST-LINK USB VBUS or external sources. - On-board ST-LINK/V3E debugger/programmer with USB re-enumeration - capability: mass storage, virtual COM port and debug port. - Comprehensive free software libraries and examples available with the STM32Cube MCU package. - Arm* Mbed Enabled* compliant (only for some Nucleo part numbers) .. image:: img/nucleo_h7a3zi_q.jpg :align: center :alt: Nucleo H7A3ZI-Q More information about the board can be found at the `Nucleo H7A3ZI-Q website`_. Hardware ******** Nucleo H7A3ZI-Q provides the following hardware components: - STM32H7A3ZI in LQFP144 package - ARM 32-bit Cortex-M7 CPU with FPU - Chrom-ART Accelerator - Hardware JPEG Codec - 280 MHz max CPU frequency - VDD from 1.62 V to 3.6 V - 2 MB Flash - ~1.4 Mbytes SRAM - 32-bit timers(2) - 16-bit timers(15) - SPI(6) - I2C(4) - I2S (3) - USART(5) - UART(5) - USB OTG Full Speed and High Speed(1) - CAN FD(2) - SAI(2) - SPDIF_Rx(4) - HDMI_CEC(1) - Dual Mode Quad SPI(1) - Camera Interface - GPIO (up to 114) with external interrupt capability - 16-bit ADC(2) with 24 channels / 3.6 MSPS - 12-bit DAC with 1/2 channels(2) - True Random Number Generator (RNG) - 16-channel DMA - LCD-TFT Controller with XGA resolution Supported Features ================== The Zephyr nucleo_h7a3zi_q board configuration supports the following hardware features: +-------------+------------+------------------------------------+ | Interface | Controller | Driver/Component | +=============+============+====================================+ | NVIC | on-chip | nested vector interrupt controller | +-------------+------------+------------------------------------+ | UART | on-chip | serial port | +-------------+------------+------------------------------------+ | PINMUX | on-chip | pinmux | +-------------+------------+------------------------------------+ | GPIO | on-chip | gpio | +-------------+------------+------------------------------------+ | PWM | on-chip | pwm | +-------------+------------+------------------------------------+ | ADC | on-chip | adc | +-------------+------------+------------------------------------+ | Backup SRAM | on-chip | Backup SRAM | +-------------+------------+------------------------------------+ | USB OTG HS | on-chip | USB device | +-------------+------------+------------------------------------+ | RNG | on-chip | True Random number generator | +-------------+------------+------------------------------------+ Other hardware features are not yet supported on this Zephyr port. The default configuration can be found in the defconfig file: :zephyr_file:`boards/st/nucleo_h7a3zi_q/nucleo_h7a3zi_q_defconfig` For more details please refer to `STM32 Nucleo-144 board User Manual`_. Default Zephyr Peripheral Mapping: ---------------------------------- The Nucleo H7A3ZI-Q board features a ST Zio connector (extended Arduino Uno V3) and a ST morpho connector. Board is configured as follows: - USART3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com) - USER_PB : PC13 - LD1 : PB0 - LD2 : PE1 - LD3 : PB14 - ADC1_INP15 : PA3 (Arduino analog, A0) System Clock ------------ Nucleo H7A3ZI-Q System Clock could be driven by an internal or external oscillator, as well as the main PLL clock. By default, the System clock is driven by the PLL clock at 96MHz, driven by an 8MHz high-speed external clock. Serial Port ----------- Nucleo H7A3ZI-Q board has 4 UARTs and 4 USARTs. The Zephyr console output is assigned to USART3. Default settings are 115200 8N1. Programming and Debugging ************************* Applications for the ``nucleo_h7a3zi_q`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo H7A3ZI-Q board includes an ST-LINK/V3E embedded debug tool interface. Flashing an application to Nucleo H7A3ZI-Q ------------------------------------------ Here is an example for the :ref:`hello_world` application. Run a serial host program to connect with your Nucleo board. .. code-block:: console $ minicom -b 115200 -D /dev/ttyACM0 Build and flash the application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_h7a3zi_q :goals: build flash You should see the following message on the console: .. code-block:: console $ Hello World! nucleo_h7a3zi_q 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: nucleo_h7a3zi_q :maybe-skip-config: :goals: debug .. _Nucleo H7A3ZI-Q website: path_to_url#overview .. _STM32 Nucleo-144 board User Manual: path_to_url .. _STM32H7A3ZI-Q on www.st.com: path_to_url .. _STM32H7A3ZI-Q reference manual: path_to_url ```
/content/code_sandbox/boards/st/nucleo_h7a3zi_q/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,627
```unknown # Enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/stm32f3_disco/stm32f3_disco_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
75
```yaml identifier: stm32f3_disco name: ST STM32F3 Discovery rev B type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 40 supported: - gpio - i2c - counter - spi - watchdog - usb_device - lsm303dlhc - nvs - can - pwm - adc - dac - dma - rtc vendor: st ```
/content/code_sandbox/boards/st/stm32f3_disco/stm32f3_disco_B.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
126
```ini source [find board/stm32f3discovery.cfg] $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/stm32f3_disco/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
68
```unknown /* * */ /dts-v1/; #include <st/f3/stm32f303Xc.dtsi> #include <st/f3/stm32f303v(b-c)tx-pinctrl.dtsi> #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32F3DISCOVERY board"; compatible = "st,stm32f3discovery"; chosen { zephyr,console = &usart1; zephyr,shell-uart = &usart1; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,canbus = &can1; }; leds { compatible = "gpio-leds"; red_led_3: led_3 { gpios = <&gpioe 9 GPIO_ACTIVE_HIGH>; label = "User LD3"; }; blue_led_4: led_4 { gpios = <&gpioe 8 GPIO_ACTIVE_HIGH>; label = "User LD4"; }; orange_led_5: led_5 { gpios = <&gpioe 10 GPIO_ACTIVE_HIGH>; label = "User LD5"; }; green_led_6: led_6 { gpios = <&gpioe 15 GPIO_ACTIVE_HIGH>; label = "User LD6"; }; green_led_7: led_7 { gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>; label = "User LD7"; }; orange_led_8: led_8 { gpios = <&gpioe 14 GPIO_ACTIVE_HIGH>; label = "User LD8"; }; blue_led_9: led_9 { gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>; label = "User LD9"; }; red_led_10: led_10 { gpios = <&gpioe 13 GPIO_ACTIVE_HIGH>; label = "User LD10"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_6; led1 = &green_led_7; sw0 = &user_button; magn0 = &lsm303dlhc_magn; watchdog0 = &iwdg; accel0 = &lsm303dlhc_accel; die-temp0 = &die_temp; volt-sensor0 = &vref; volt-sensor1 = &vbat; }; }; &clk_lsi { status = "okay"; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { prediv = <1>; mul = <9>; clocks = <&clk_hse>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(72)>; ahb-prescaler = <1>; apb1-prescaler = <2>; apb2-prescaler = <1>; }; &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart4 { pinctrl-0 = <&uart4_tx_pc10 &uart4_rx_pc11>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; lsm303dlhc_magn: lsm303dlhc-magn@1e { compatible = "st,lsm303dlhc-magn"; reg = <0x1e>; }; lsm303dlhc_accel: lsm303dlhc-accel@19 { compatible = "st,lis2dh", "st,lsm303dlhc-accel"; reg = <0x19>; irq-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>, <&gpioe 5 GPIO_ACTIVE_HIGH>; }; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa9 &i2c2_sda_pa10>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 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: &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; pinctrl-names = "default"; status = "okay"; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; backup_regs { status = "okay"; }; }; &can1 { pinctrl-0 = <&can_rx_pd0 &can_tx_pd1>; pinctrl-names = "default"; status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { label = "storage"; reg = <0x0003e800 DT_SIZE_K(6)>; }; }; }; &iwdg { status = "okay"; }; &timers1 { st,prescaler = <10000>; status = "okay"; pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pa8>; pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_in1_pa0>; pinctrl-names = "default"; st,adc-clock-source = <SYNC>; st,adc-prescaler = <2>; status = "okay"; }; &die_temp { status = "okay"; }; &dac1 { status = "okay"; /* dac output pins(pa4,pa5,pa6) might conflict with spi1 pins */ pinctrl-0 = <&dac_out1_pa4>; pinctrl-names = "default"; }; &dma1 { status = "okay"; }; &vref { status = "okay"; }; &vbat { status = "okay"; }; ```
/content/code_sandbox/boards/st/stm32f3_disco/stm32f3_disco.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,679
```cmake board_runner_args(jlink "--device=STM32F107VC" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/stm3210c_eval/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
55
```unknown # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # GPIO Controller CONFIG_GPIO=y # RCC Controller CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/stm3210c_eval/stm3210c_eval_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
57
```unknown config BOARD_STM3210C_EVAL select SOC_STM32F107XC ```
/content/code_sandbox/boards/st/stm3210c_eval/Kconfig.stm3210c_eval
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
20
```yaml board: name: stm3210c_eval vendor: st socs: - name: stm32f107xc ```
/content/code_sandbox/boards/st/stm3210c_eval/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown /* * */ /dts-v1/; #include <st/f1/stm32f107Xc.dtsi> #include <st/f1/stm32f107v(b-c)tx-pinctrl.dtsi> #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM3210C-EVAL board"; compatible = "st,stm3210c-eval"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds { compatible = "gpio-leds"; green_led_2: led_2 { gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpiob 9 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_2; sw0 = &user_button; watchdog0 = &iwdg; }; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { mul = <9>; prediv = <1>; clocks = <&clk_hse>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(72)>; ahb-prescaler = <1>; apb1-prescaler = <2>; apb2-prescaler = <1>; }; &usart2 { pinctrl-0 = <&usart2_tx_remap1_pd5 &usart2_rx_remap1_pd6>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &iwdg { status = "okay"; }; ```
/content/code_sandbox/boards/st/stm3210c_eval/stm3210c_eval.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
469
```yaml identifier: stm3210c_eval name: ST STM3210C Evaluation type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 64 flash: 256 supported: - watchdog vendor: st ```
/content/code_sandbox/boards/st/stm3210c_eval/stm3210c_eval.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
68
```ini source [find board/stm3210c_eval.cfg] $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/stm3210c_eval/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
70
```restructuredtext .. _stm3210c_eval_board: ST STM3210C Evaluation ###################### Overview ******** The STM3210C-EVAL evaluation board is a complete development platform for STMicroelectronic's ARM Cortex-M3 core-based STM32F107VCT microcontroller. The range of hardware features on the board help you to evaluate all peripherals (USB-OTG FS, ethernet, motor control, CAN, microSD CardTM, smartcard, USART, audio DAC, MEMS, EEPROM and more) and develop your own applications. Extension headers make it easy to connect a daughterboard or wrapping board for your specific application. .. image:: img/stm3210c_eval.jpg :align: center :alt: STM3210C-EVAL More information about the board can be found at the `STM3210C-EVAL website`_. Hardware ******** STM3210C-EVAL provides the following hardware components: - Three 5 V power supply options: - Power jack - USB connector - daughterboard - Boot from user Flash, system memory or SRAM. - I2S audio DAC, stereo audio jack. - 2 GByte (or more) microSD CardTM. - Both type A and B smartcard support. - I2C compatible serial interface 64 Kbit EEPROM, MEMS and I/O expander. - RS-232 communication. - IrDA transceiver. - USB-OTG full speed, USB microAB connector. - IEEE-802.3-2002 compliant ethernet connector. - Two channels of CAN2.0A/B compliant connection. - Inductor motor control connector. - JTAG and trace debug support. - 3.2" 240x320 TFT color LCD with touch screen. - Joystick with 4-direction control and selector. - Reset, Wakeup, Tamper and User button. - 4 color LEDs. - RTC with backup battery. - MCU consumption measurement circuit. - Extension connector for daughterboard or wrapping board. More information about STM32F107VCT can be found here: - `STM32F107VCT reference manual`_ Supported Features ================== The Zephyr stm3210c_eval board configuration 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 | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | CLOCK | on-chip | reset and clock control | +-----------+------------+-------------------------------------+ | FLASH | on-chip | flash memory | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | independent watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported in this Zephyr port. The default configuration can be found in :zephyr_file:`boards/st/stm3210c_eval/stm3210c_eval_defconfig`. Connections and IOs =================== Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs. Board connectors: ----------------- .. image:: img/stm3210c_eval_connectors.jpg :align: center :alt: STM3210C_EVAL connectors Default Zephyr Peripheral Mapping: ---------------------------------- - UART_2_TX : PD5 - UART_2_RX : PD6 - USER_PB : PB9 - LED2 : PD13 Programming and Debugging ************************* Flashing ======== STM3210C-EVAL board includes an ST-LINK/V2-1 embedded debug tool interface. At power-on, the board is in firmware-upgrade mode (also called DFU for "Device Firmware Upgrade"), allowing the firmware to be updated through the USB. This interface is supported by the openocd version included in Zephyr SDK. Applications for the ``stm3210c_eval`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing an application to STM3210C-EVAL ---------------------------------------- Connect the STM3210C-EVAL to your host computer using the USB port, then build and flash an application in the usual way. Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: stm3210c_eval :goals: build flash You will see the LED blinking every second. Debugging ========= You can run a serial host program to connect with your STM3210C-EVAL board. For example, on Linux: .. code-block:: console $ minicom -D /dev/ttyACM0 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: stm3210c_eval :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _STM3210C-EVAL website: path_to_url .. _STM32F107VCT reference manual: path_to_url ```
/content/code_sandbox/boards/st/stm3210c_eval/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,265
```cmake board_runner_args(jlink "--device=STM32H753ZI" "--speed=4000") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") board_runner_args(openocd --target-handle=_CHIPNAME.cpu0) include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_h753zi/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
116
```restructuredtext .. _stm32f3_disco_board: ST STM32F3 Discovery #################### Overview ******** The STM32F3DISCOVERY Discovery kit features an ARM Cortex-M4 based STM32F303VC MCU with everything required for beginners and experienced users to get started quickly. Here are some highlights of the STM32F3DISCOVERY board: - STM32 microcontroller in LQFP100 package - Extension header for all LQFP100 I/Os for quick connection to prototyping board and easy probing - On-board, ST-LINK/V2 for PCB version A or B or ST-LINK/V2-B for PCB version C and newer, debugger/programmer with SWD connector - Board power supply: through USB bus or from an external 3 V or 5 V supply voltage - External application power supply: 3 V and 5 V - Ten LEDs: - 3.3 V power on (LD1) - USB communication (LD2) - Eight user LEDs: red (LD3/LD10), blue (LD4/LD9), orange (LD5/LD9) and green (LD6/LD7) - Two push-buttons: USER and RESET - USB USER with Mini-B connector - L3GD20 or I3G4250D, ST MEMS motion sensor, 3-axis digital output gyroscope - LSM303DLHC or LSM303AGR, ST MEMS system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor; .. HINT:: Recent PCB revisions (E and newer) are shipped with I3G4250D and LSM303AGR. .. image:: img/stm32f3_disco.jpg :align: center :alt: STM32F3DISCOVERY More information about the board can be found at the `STM32F3DISCOVERY website`_. Hardware ******** STM32F3DISCOVERY Discovery kit provides the following hardware components: - STM32F303VCT6 in LQFP100 package - ARM |reg| 32-bit Cortex |reg| -M4 CPU with FPU - 72 MHz max CPU frequency - VDD from 2.0 V to 3.6 V - 256 KB Flash - 40 KB SRAM - Routine booster: 8 Kbytes of SRAM on instruction and data bus - GPIO with external interrupt capability - 4x12-bit ADC with 39 channels - 2x12-bit D/A converters - RTC - General Purpose Timers (13) - USART/UART (5) - I2C (2) - SPI (3) - CAN - USB 2.0 full speed interface - Infrared transmitter - DMA Controller More information about STM32F303VC can be found here: - `STM32F303VC on www.st.com`_ - `STM32F303xC reference manual`_ Supported Features ================== The Zephyr stm32f3_disco board configuration 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 | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | USB | on-chip | USB device | +-----------+------------+-------------------------------------+ | CAN | on-chip | CAN | +-----------+------------+-------------------------------------+ | IWDG | on-chip | Independent WatchDoG | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ | DAC | on-chip | dac | +-----------+------------+-------------------------------------+ | DMA | on-chip | Direct Memory Access | +-----------+------------+-------------------------------------+ | die-temp | on-chip | die temperature sensor | +-----------+------------+-------------------------------------+ | RTC | on-chip | rtc | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported on Zephyr porting. The default configuration can be found in :zephyr_file:`boards/st/stm32f3_disco/stm32f3_disco_defconfig` Pin Mapping =========== STM32F3DISCOVERY Discovery kit has 6 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc. For more details please refer to `STM32F3DISCOVERY board User Manual`_. Default Zephyr Peripheral Mapping: ---------------------------------- .. rst-class:: rst-columns - UART_1_TX : PC4 - UART_1_RX : PC5 - UART_2_TX : PA2 - UART_2_RX : PA3 - UART_4_TX : PC10 - UART_4_RX : PC11 - I2C1_SCL : PB6 - I2C1_SDA : PB7 - I2C2_SCL : PA9 - I2C2_SDA : PA10 - SPI1_NSS : PA4 - SPI1_SCK : PA5 - SPI1_MISO : PA6 - SPI1_MOSI : PA7 - SPI2_NSS : PB12 - SPI2_SCK : PB13 - SPI2_MISO : PB14 - SPI2_MOSI : PB15 - CAN1_RX : PD0 - CAN1_TX : PD1 - USB_DM : PA11 - USB_DP : PA12 - USER_PB : PA0 - LD3 : PE9 - LD4 : PE8 - LD5 : PE10 - LD6 : PE15 - LD7 : PE11 - LD8 : PE14 - LD9 : PE12 - LD10 : PE13 - PWM : PA8 - ADC1 : PA0 - DAC1 : PA4 System Clock ============ STM32F3DISCOVERY System Clock could be driven by internal or external oscillator, as well as main PLL clock. By default System clock is driven by PLL clock at 72 MHz, driven by 8 MHz MCO from the ST Link. Serial Port =========== STM32F3DISCOVERY Discovery kit has up to 5 UARTs. The Zephyr console output is assigned to UART1. Default settings are 115200 8N1. I2C === STM32F3DISCOVERY has up to 2 I2Cs. I2C1 is connected to the LSM303DLHC and is an ultra-compact low-power system-in-package featuring a 3D digital linear acceleration sensor and a 3D digital magnetic sensor. USB === STM32F3DISCOVERY has a USB 2.0 full-speed device interface available through its mini USB connector (USB USER). CAN === The STM32F3DISCOVERY does not have an onboard CAN transceiver. In order to use the CAN bus on the this board, an external CAN bus transceiver must be connected to ``PD0`` (``CAN1_RX``) and ``PD1`` (``CAN1_TX``). Programming and Debugging ************************* Flashing ======== STM32F3DISCOVERY Discovery kit includes a ST-LINK/V2 or ST-LINK/V2-B embedded debug tool interface. Applications for the ``stm32f3_disco`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing an application to STM32F3DISCOVERY ------------------------------------------- First, connect the STM32F3DISCOVERY Discovery kit to your host computer using the USB port to prepare it for flashing. Then build and flash your application. Here is an example for the :ref:`hello_world` application. .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco :goals: build flash In case you are using a recent PCB revision (E or newer), you have to use an adapted board definition: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco@E :goals: build flash Run a serial host program to connect with your board. For PCB version A or B a TTL(3.3V) serial adapter is required. For PCB version C and newer a Virtual Com Port (VCP) is available on the USB ST-LINK port. .. code-block:: console $ minicom -D /dev/<tty device> Replace <tty_device> with the port where the STM32F3DISCOVERY board can be found. For example, under Linux, /dev/ttyUSB0. You should see the following message on the console: .. code-block:: console Hello World! arm 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: stm32f3_disco :goals: debug Again you have to use the adapted command for newer PCB revisions (E and newer): .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: stm32f3_disco@E :goals: debug .. _STM32F3DISCOVERY website: path_to_url .. _STM32F3DISCOVERY board User Manual: path_to_url .. _STM32F303VC on www.st.com: path_to_url .. _STM32F303xC reference manual: path_to_url ```
/content/code_sandbox/boards/st/stm32f3_disco/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,269
```unknown # Enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y # Enable UART CONFIG_SERIAL=y # Console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # Enable GPIO CONFIG_GPIO=y # Enable clocks CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_h753zi/nucleo_h753zi_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
72
```yaml identifier: nucleo_h753zi name: ST Nucleo H753ZI type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 512 flash: 2048 supported: - arduino_gpio - arduino_i2c - uart - gpio - counter - i2c - pwm - adc - netif:eth - spi - usb_device - can vendor: st ```
/content/code_sandbox/boards/st/nucleo_h753zi/nucleo_h753zi.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
127
```unknown config BOARD_NUCLEO_H753ZI select SOC_STM32H753XX ```
/content/code_sandbox/boards/st/nucleo_h753zi/Kconfig.nucleo_h753zi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
22
```yaml board: name: nucleo_h753zi vendor: st socs: - name: stm32h753xx ```
/content/code_sandbox/boards/st/nucleo_h753zi/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown # STM32H753ZI Nucleo board configuration if BOARD_NUCLEO_H753ZI if NETWORKING config NET_L2_ETHERNET default y endif # NETWORKING endif # BOARD_NUCLEO_H753ZI ```
/content/code_sandbox/boards/st/nucleo_h753zi/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
57
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 3 0>, /* A0 */ <1 0 &gpioc 0 0>, /* A1 */ <2 0 &gpioc 3 0>, /* A2 */ <3 0 &gpiob 1 0>, /* A3 */ <4 0 &gpioc 2 0>, /* A4 */ <5 0 &gpiof 10 0>, /* A5 */ <6 0 &gpiob 7 0>, /* D0 */ <7 0 &gpiob 6 0>, /* D1 */ <8 0 &gpiog 14 0>, /* D2 */ <9 0 &gpioe 13 0>, /* D3 */ <10 0 &gpioe 14 0>, /* D4 */ <11 0 &gpioe 11 0>, /* D5 */ <12 0 &gpioe 9 0>, /* D6 */ <13 0 &gpiog 12 0>, /* D7 */ <14 0 &gpiof 3 0>, /* D8 */ <15 0 &gpiod 15 0>, /* D9 */ <16 0 &gpiod 14 0>, /* D10 */ <17 0 &gpiob 5 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; ```
/content/code_sandbox/boards/st/nucleo_h753zi/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
494
```ini source [find board/st_nucleo_h743zi.cfg] reset_config srst_only srst_nogate connect_assert_srst $_CHIPNAME.cpu0 configure -event gdb-attach { echo "Debugger attaching: halting execution" gdb_breakpoint_override hard } $_CHIPNAME.cpu0 configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } # Due to the use of connect_assert_srst, running gdb requires # to reset halt just after openocd init. rename init old_init proc init {} { old_init reset halt } ```
/content/code_sandbox/boards/st/nucleo_h753zi/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
130
```unknown /* * */ /dts-v1/; #include <st/h7/stm32h753Xi.dtsi> #include <st/h7/stm32h753zitx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32H743ZI-NUCLEO board"; compatible = "st,stm32h753zi-nucleo"; chosen { zephyr,console = &usart3; zephyr,shell-uart = &usart3; zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,dtcm = &dtcm; zephyr,code-partition = &slot0_partition; zephyr,canbus = &fdcan1; }; leds: leds { compatible = "gpio-leds"; green_led: led_0 { gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>; label = "User LD1"; }; yellow_led: led_1 { gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; pwmleds { compatible = "pwm-leds"; red_pwm_led: red_pwm_led { pwms = <&pwm12 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button_0 { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led; led1 = &yellow_led; pwm-led0 = &red_pwm_led; sw0 = &user_button; volt-sensor1 = &vbat; }; }; &clk_lsi { status = "okay"; }; &clk_hsi48 { status = "okay"; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { div-m = <2>; mul-n = <240>; div-p = <2>; div-q = <2>; div-r = <2>; clocks = <&clk_hse>; status = "okay"; }; &pll2 { div-m = <4>; mul-n = <120>; div-p = <2>; div-q = <3>; /* gives 80MHz to the FDCAN */ div-r = <2>; clocks = <&clk_hse>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(480)>; d1cpre = <1>; hpre = <2>; d1ppre = <2>; d2ppre1 = <2>; d2ppre2 = <2>; d3ppre = <2>; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; pinctrl-names = "default"; status = "okay"; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB4 0x00010000>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &timers12 { st,prescaler = <10000>; status = "okay"; pwm12: pwm { status = "okay"; pinctrl-0 = <&tim12_ch1_pb14>; pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_inp15_pa3>; pinctrl-names = "default"; st,adc-clock-source = <SYNC>; st,adc-prescaler = <4>; status = "okay"; }; &rng { status = "okay"; }; &fdcan1 { clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000100>, <&rcc STM32_SRC_PLL2_Q FDCAN_SEL(2)>; pinctrl-0 = <&fdcan1_rx_pd0 &fdcan1_tx_pd1>; pinctrl-names = "default"; status = "okay"; }; /* * WARNING: * Possible pin conflicts: * The pins PA2 and PB13 may conflict on selection of ETH_STM32_HAL, * since they are used in ST Zio or ST morpho connectors. * To avoid conflicting states the jumpers JP6 and JP7 * must be in ON state. */ &mac { status = "okay"; pinctrl-0 = <&eth_rxd0_pc4 &eth_rxd1_pc5 &eth_ref_clk_pa1 &eth_crs_dv_pa7 &eth_tx_en_pg11 &eth_txd0_pg13 &eth_txd1_pb13>; pinctrl-names = "default"; }; &mdio { status = "okay"; pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>; pinctrl-names = "default"; ethernet-phy@0 { compatible = "ethernet-phy"; reg = <0x00>; status = "okay"; }; }; &spi1 { status = "okay"; pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>; pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* 128KB for bootloader */ boot_partition: partition@0 { label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(128)>; read-only; }; /* storage: 128KB for settings */ storage_partition: partition@20000 { label = "storage"; reg = <0x00020000 DT_SIZE_K(128)>; }; /* application image slot: 256KB */ slot0_partition: partition@40000 { label = "image-0"; reg = <0x00040000 DT_SIZE_K(256)>; }; /* backup slot: 256KB */ slot1_partition: partition@80000 { label = "image-1"; reg = <0x00080000 DT_SIZE_K(256)>; }; /* swap slot: 128KB */ scratch_partition: partition@c0000 { label = "image-scratch"; reg = <0x000c0000 DT_SIZE_K(128)>; }; }; }; ```
/content/code_sandbox/boards/st/nucleo_h753zi/nucleo_h753zi.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,660
```unknown /* */ #include <zephyr/dt-bindings/gpio/gpio.h> #include <zephyr/dt-bindings/gpio/st-morpho-header.h> / { st_morpho_header: st-morpho-header { compatible = "st-morpho-header"; #gpio-cells = <2>; gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>; gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>; gpio-map = <ST_MORPHO_L_1 0 &gpioc 10 0>, <ST_MORPHO_L_2 0 &gpioc 11 0>, <ST_MORPHO_L_3 0 &gpioc 12 0>, <ST_MORPHO_L_4 0 &gpiod 2 0>, <ST_MORPHO_L_13 0 &gpioa 13 0>, <ST_MORPHO_L_15 0 &gpioa 14 0>, <ST_MORPHO_L_17 0 &gpioa 15 0>, <ST_MORPHO_L_21 0 &gpiob 7 0>, <ST_MORPHO_L_23 0 &gpioc 13 0>, <ST_MORPHO_L_25 0 &gpioc 14 0>, <ST_MORPHO_L_27 0 &gpioc 15 0>, <ST_MORPHO_L_28 0 &gpioa 0 0>, <ST_MORPHO_L_29 0 &gpiof 0 0>, <ST_MORPHO_L_30 0 &gpioa 1 0>, <ST_MORPHO_L_31 0 &gpiof 1 0>, <ST_MORPHO_L_32 0 &gpioa 4 0>, <ST_MORPHO_L_34 0 &gpiob 0 0>, <ST_MORPHO_L_35 0 &gpioc 2 0>, <ST_MORPHO_L_36 0 &gpioc 1 0>, /* SB56=ON, SB46=OFF */ <ST_MORPHO_L_37 0 &gpioc 3 0>, <ST_MORPHO_L_38 0 &gpioc 0 0>, /* SB51=ON, SB52=OFF */ <ST_MORPHO_R_1 0 &gpioc 9 0>, <ST_MORPHO_R_2 0 &gpioc 8 0>, <ST_MORPHO_R_3 0 &gpiob 8 0>, <ST_MORPHO_R_4 0 &gpioc 6 0>, <ST_MORPHO_R_5 0 &gpiob 9 0>, <ST_MORPHO_R_6 0 &gpioc 5 0>, <ST_MORPHO_R_11 0 &gpioa 5 0>, <ST_MORPHO_R_12 0 &gpioa 12 0>, <ST_MORPHO_R_13 0 &gpioa 6 0>, <ST_MORPHO_R_14 0 &gpioa 11 0>, <ST_MORPHO_R_15 0 &gpioa 7 0>, <ST_MORPHO_R_16 0 &gpiob 12 0>, <ST_MORPHO_R_17 0 &gpiob 6 0>, <ST_MORPHO_R_18 0 &gpiob 11 0>, <ST_MORPHO_R_19 0 &gpioc 7 0>, <ST_MORPHO_R_21 0 &gpioa 9 0>, <ST_MORPHO_R_22 0 &gpiob 2 0>, <ST_MORPHO_R_23 0 &gpioa 8 0>, <ST_MORPHO_R_24 0 &gpiob 1 0>, <ST_MORPHO_R_25 0 &gpiob 10 0>, <ST_MORPHO_R_26 0 &gpiob 15 0>, <ST_MORPHO_R_27 0 &gpiob 4 0>, <ST_MORPHO_R_28 0 &gpiob 14 0>, <ST_MORPHO_R_29 0 &gpiob 5 0>, <ST_MORPHO_R_30 0 &gpiob 13 0>, <ST_MORPHO_R_31 0 &gpiob 3 0>, <ST_MORPHO_R_33 0 &gpioa 10 0>, <ST_MORPHO_R_34 0 &gpioc 4 0>, <ST_MORPHO_R_35 0 &gpioa 2 0>, <ST_MORPHO_R_37 0 &gpioa 3 0>; }; }; ```
/content/code_sandbox/boards/st/nucleo_f334r8/st_morpho_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,183
```cmake board_runner_args(jlink "--device=STM32F334R8" "--speed=4000") board_runner_args(pyocd "--target=stm32f334r8tx") board_runner_args(pyocd "--flash-opt=-O reset_type=hw") board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset") board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_f334r8/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
168
```unknown /* * */ /dts-v1/; #include <st/f3/stm32f334X8.dtsi> #include <st/f3/stm32f334r(6-8)tx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include "st_morpho_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32F334R8-NUCLEO board"; compatible = "st,stm32f334r8-nucleo"; chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds: leds { compatible = "gpio-leds"; green_led_2: led_2 { gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_2; sw0 = &user_button; watchdog0 = &iwdg; }; }; &clk_lsi { status = "okay"; }; &clk_hse { hse-bypass; clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ status = "okay"; }; &pll { clocks = <&clk_hse>; prediv = <1>; mul = <9>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(72)>; ahb-prescaler = <1>; apb1-prescaler = <2>; apb2-prescaler = <1>; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &timers1 { st,prescaler = <10000>; status = "okay"; pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pa8>; pinctrl-names = "default"; }; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; }; &iwdg { status = "okay"; }; &flash0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; /* Set 6Kb of storage at the end of the 64Kb of flash */ storage_partition: partition@e800 { label = "storage"; reg = <0x0000e800 DT_SIZE_K(6)>; }; }; }; ```
/content/code_sandbox/boards/st/nucleo_f334r8/nucleo_f334r8.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
922
```restructuredtext .. _nucleo_h753zi_board: ST Nucleo H753ZI ################ Overview ******** The STM32 Nucleo-144 boards offer combinations of performance and power that provide an affordable and flexible way for users to build prototypes and try out new concepts. For compatible boards, the SMPS (Switched-Mode Power Supply) significantly reduces power consumption in Run mode. The Arduino-compatible ST Zio connector expands functionality of the Nucleo open development platform, with a wide choice of specialized Arduino* Uno V3 shields. The STM32 Nucleo-144 board does not require any separate probe as it integrates the ST-LINK/V2-1 debugger/programmer. The STM32 Nucleo-144 board comes with the STM32 comprehensive free software libraries and examples available with the STM32Cube MCU Package. Key Features - STM32 microcontroller in LQFP144 package - Ethernet compliant with IEEE-802.3-2002 (depending on STM32 support) - USB OTG or full-speed device (depending on STM32 support) - 3 user LEDs - 2 user and reset push-buttons - 32.768 kHz crystal oscillator - Board connectors: - USB with Micro-AB - SWD - Ethernet RJ45 (depending on STM32 support) - ST Zio connector including Arduino* Uno V3 - ST morpho - Flexible power-supply options: ST-LINK USB VBUS or external sources. - On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration - capability: mass storage, virtual COM port and debug port. - Comprehensive free software libraries and examples available with the STM32Cube MCU package. - Arm* Mbed Enabled* compliant (only for some Nucleo part numbers) .. image:: img/nucleo_h753zi.jpg :align: center :alt: Nucleo H753ZI More information about the board can be found at the `Nucleo H753ZI website`_. Hardware ******** Nucleo H753ZI provides the following hardware components: - STM32H753ZI in LQFP144 package - ARM 32-bit Cortex-M7 CPU with FPU - Chrom-ART Accelerator - Hardware JPEG Codec - 480 MHz max CPU frequency - VDD from 1.62 V to 3.6 V - 2 MB Flash - 1 MB SRAM - High-resolution timer (2.1 ns) - 32-bit timers(2) - 16-bit timers(12) - SPI(6) - I2C(4) - I2S (3) - USART(4) - UART(4) - USB OTG Full Speed and High Speed(1) - USB OTG Full Speed(1) - CAN FD(2) - SAI(2) - SPDIF_Rx(4) - HDMI_CEC(1) - Dual Mode Quad SPI(1) - Camera Interface - GPIO (up to 114) with external interrupt capability - 16-bit ADC(3) with 36 channels / 3.6 MSPS - 12-bit DAC with 2 channels(2) - True Random Number Generator (RNG) - 16-channel DMA - LCD-TFT Controller with XGA resolution - Cryptographic acceleration: AES 128, 192, 256, TDES, HASH (MD5, SHA-1, SHA-2), HMAC - Secure firmware upgrade support, Secure access mode Supported Features ================== The Zephyr nucleo_h753zi board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ | NVIC | on-chip | nested vector interrupt controller | +-----------+------------+-------------------------------------+ | UART | on-chip | serial port | +-----------+------------+-------------------------------------+ | PINMUX | on-chip | pinmux | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | RTC | on-chip | counter | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ | RNG | on-chip | True Random number generator | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | USB | on-chip | usb_device | +-----------+------------+-------------------------------------+ | CAN/CANFD | on-chip | canbus | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported on this Zephyr port. The default configuration can be found in the defconfig file: :zephyr_file:`boards/st/nucleo_h753zi/nucleo_h753zi_defconfig` For more details please refer to `STM32 Nucleo-144 board User Manual`_. Default Zephyr Peripheral Mapping: ---------------------------------- The Nucleo H753ZI board features a ST Zio connector (extended Arduino Uno V3) and a ST morpho connector. Board is configured as follows: - UART_3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com) - USER_PB : PC13 - LD1 : PB0 - LD2 : PB7 - LD3 : PB14 - I2C : PB8, PB9 - ADC1_INP15 : PA3 - ETH : PA1, PA2, PA7, PB13, PC1, PC4, PC5, PG11, PG13 - SPI1 NSS/SCK/MISO/MOSI : PD14PA5/PA6/PB5 (Arduino SPI) - CAN/CANFD : PD0, PD1 System Clock ------------ Nucleo H753ZI System Clock could be driven by an internal or external oscillator, as well as the main PLL clock. By default, the System clock is driven by the PLL clock at 96MHz, driven by an 8MHz high-speed external clock. Serial Port ----------- Nucleo H753ZI board has 4 UARTs and 4 USARTs. The Zephyr console output is assigned to UART3. Default settings are 115200 8N1. CAN, CANFD ---------- Requires an external CAN or CANFD transceiver. Programming and Debugging ************************* Applications for the ``nucleo_h753zi`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). .. note:: If using OpenOCD you will need a recent development version as the last official release does not support H7 series yet. You can also choose the ``stm32cubeprogrammer`` runner. Flashing ======== Nucleo H753ZI board includes an ST-LINK/V2-1 embedded debug tool interface. Flashing an application to Nucleo H753ZI ---------------------------------------- Here is an example for the :ref:`hello_world` application. Run a serial host program to connect with your Nucleo board. .. code-block:: console $ minicom -b 115200 -D /dev/ttyACM0 Build and flash the application: .. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: nucleo_h753zi :goals: build flash You should see the following message on the console: .. code-block:: console $ Hello World! nucleo_h753zi 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: nucleo_h753zi :maybe-skip-config: :goals: debug .. _Nucleo H753ZI website: path_to_url .. _STM32 Nucleo-144 board User Manual: path_to_url .. _STM32H753ZI on www.st.com: path_to_url .. _STM32H753 reference manual: path_to_url ```
/content/code_sandbox/boards/st/nucleo_h753zi/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,869
```yaml board: name: nucleo_f334r8 vendor: st socs: - name: stm32f334x8 ```
/content/code_sandbox/boards/st/nucleo_f334r8/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown # STM32 Nucleo-64 development board with STM32F334R8 MCU if BOARD_NUCLEO_F334R8 config SPI_STM32_INTERRUPT default y depends on SPI endif # BOARD_NUCLEO_F334R8 ```
/content/code_sandbox/boards/st/nucleo_f334r8/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
58
```unknown config BOARD_NUCLEO_F334R8 select SOC_STM32F334X8 ```
/content/code_sandbox/boards/st/nucleo_f334r8/Kconfig.nucleo_f334r8
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
23
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 0 0>, /* A0 */ <1 0 &gpioa 1 0>, /* A1 */ <2 0 &gpioa 4 0>, /* A2 */ <3 0 &gpiob 0 0>, /* A3 */ <4 0 &gpioc 1 0>, /* A4 */ <5 0 &gpioc 0 0>, /* A5 */ <6 0 &gpioa 3 0>, /* D0 */ <7 0 &gpioa 2 0>, /* D1 */ <8 0 &gpioa 10 0>, /* D2 */ <9 0 &gpiob 3 0>, /* D3 */ <10 0 &gpiob 5 0>, /* D4 */ <11 0 &gpiob 4 0>, /* D5 */ <12 0 &gpiob 10 0>, /* D6 */ <13 0 &gpioa 8 0>, /* D7 */ <14 0 &gpioa 9 0>, /* D8 */ <15 0 &gpioc 7 0>, /* D9 */ <16 0 &gpiob 6 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; ```
/content/code_sandbox/boards/st/nucleo_f334r8/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
492
```yaml identifier: nucleo_f334r8 name: ST Nucleo F334R8 type: mcu arch: arm toolchain: - zephyr - gnuarmemb - xtools ram: 12 flash: 64 testing: ignore_tags: - bluetooth - net supported: - arduino_gpio - arduino_i2c - arduino_spi - gpio - i2c - spi - pwm - watchdog - counter - nvs vendor: st ```
/content/code_sandbox/boards/st/nucleo_f334r8/nucleo_f334r8.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
132
```ini source [find board/st_nucleo_f3.cfg] $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/nucleo_f334r8/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
70
```unknown # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y # Enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # GPIO Controller CONFIG_GPIO=y # Enable clock CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_f334r8/nucleo_f334r8_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
57
```cmake board_runner_args(jlink "--device=STM32L496ZG" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_l496zg/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```unknown config BOARD_NUCLEO_L496ZG select SOC_STM32L496XX ```
/content/code_sandbox/boards/st/nucleo_l496zg/Kconfig.nucleo_l496zg
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
22
```yaml identifier: nucleo_l496zg name: ST Nucleo L496ZG type: mcu arch: arm toolchain: - zephyr - gnuarmemb ram: 320 flash: 1024 supported: - arduino_i2c - arduino_gpio - arduino_spi - gpio - i2c - spi - pwm - counter - watchdog testing: ignore_tags: - net - bluetooth vendor: st ```
/content/code_sandbox/boards/st/nucleo_l496zg/nucleo_l496zg.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
123
```yaml board: name: nucleo_l496zg vendor: st socs: - name: stm32l496xx ```
/content/code_sandbox/boards/st/nucleo_l496zg/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown /* * */ /dts-v1/; #include <st/l4/stm32l496Xg.dtsi> #include <st/l4/stm32l496z(e-g)tx-pinctrl.dtsi> #include "arduino_r3_connector.dtsi" #include <zephyr/dt-bindings/input/input-event-codes.h> / { model = "STMicroelectronics STM32L496ZG-NUCLEO board"; compatible = "st,stm32l496zg-nucleo"; chosen { zephyr,console = &lpuart1; zephyr,shell-uart = &lpuart1; zephyr,sram = &sram0; zephyr,flash = &flash0; }; leds: leds { compatible = "gpio-leds"; green_led_1: led_1 { gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; label = "User LD1"; }; blue_led_2: led_2 { gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; red_led_3: led_3 { gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>; label = "User LD3"; }; }; pwmleds { compatible = "pwm-leds"; red_pwm_led: red_pwm_led { pwms = <&pwm15 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; gpio_keys { compatible = "gpio-keys"; user_button: button { label = "User Button"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; zephyr,code = <INPUT_KEY_0>; }; }; aliases { led0 = &green_led_1; led1 = &blue_led_2; led2 = &red_led_3; pwm-led0 = &red_pwm_led; sw0 = &user_button; watchdog0 = &wwdg; }; }; &clk_lsi { status = "okay"; }; &clk_hsi { status = "okay"; }; &pll { div-m = <1>; mul-n = <20>; div-p = <7>; div-q = <2>; div-r = <4>; clocks = <&clk_hsi>; status = "okay"; }; &rcc { clocks = <&pll>; clock-frequency = <DT_FREQ_M(80)>; ahb-prescaler = <1>; apb1-prescaler = <1>; apb2-prescaler = <1>; }; &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &timers1 { st,prescaler = <10000>; status = "okay"; pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pe9 &tim1_ch2_pe11 &tim1_ch3_pe13>; pinctrl-names = "default"; }; }; &timers2 { status = "okay"; pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; pinctrl-names = "default"; }; }; &timers15 { st,prescaler = <10000>; status = "okay"; pwm15: pwm { status = "okay"; pinctrl-0 = <&tim15_ch1_pb14>; pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; pinctrl-names = "default"; status = "okay"; clock-frequency = <I2C_BITRATE_FAST>; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &rtc { clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, <&rcc STM32_SRC_LSI RTC_SEL(2)>; status = "okay"; }; &wwdg { status = "okay"; }; ```
/content/code_sandbox/boards/st/nucleo_l496zg/nucleo_l496zg.dts
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,104
```restructuredtext .. _nucleo_f334r8_board: ST Nucleo F334R8 ################ Overview ******** STM32 Nucleo-64 development board with STM32F334R8 MCU, supports Arduino and ST morpho connectivity. The STM32 Nucleo board provides an affordable and flexible way for users to try out new concepts, and build prototypes with the STM32 microcontroller, choosing from the various combinations of performance, power consumption and features. The Arduino* Uno V3 connectivity support and the ST morpho headers allow easy functionality expansion of the STM32 Nucleo open development platform with a wide choice of specialized shields. The STM32 Nucleo board does not require any separate probe as it integrates the ST-LINK/V2-1 debugger and programmer. The STM32 Nucleo board comes with the STM32 comprehensive software HAL library together with various packaged software examples. .. image:: img/nucleo_f334r8.jpg :align: center :alt: Nucleo F334R8 More information about the board can be found at the `Nucleo F334R8 website`_. Hardware ******** Nucleo F334R8 provides the following hardware components: - STM32 microcontroller in QFP64 package - Two types of extension resources: - Arduino* Uno V3 connectivity - ST morpho extension pin headers for full access to all STM32 I/Os - ARM* mbed* - On-board ST-LINK/V2-1 debugger/programmer with SWD connector: - Selection-mode switch to use the kit as a standalone ST-LINK/V2-1 - Flexible board power supply: - USB VBUS or external source (3.3V, 5V, 7 - 12V) - Power management access point - Three LEDs: - USB communication (LD1), user LED (LD2), power LED (LD3) - Two push-buttons: USER and RESET - USB re-enumeration capability. Three different interfaces supported on USB: - Virtual COM port - Mass storage - Debug port - Support of wide choice of Integrated Development Environments (IDEs) including: - IAR - ARM Keil - GCC-based IDEs More information about STM32F334R8 can be found in the `STM32F334 reference manual`_ Supported Features ================== The Zephyr nucleo_f334r8 board configuration 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 | +-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ | CLOCK | on-chip | reset and clock control | +-----------+------------+-------------------------------------+ | FLASH | on-chip | flash memory | +-----------+------------+-------------------------------------+ | WATCHDOG | on-chip | independent watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not yet supported in this Zephyr port. The default configuration can be found in :zephyr_file:`boards/st/nucleo_f334r8/nucleo_f334r8_defconfig` Connections and IOs =================== Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs. Board connectors: ----------------- .. image:: img/nucleo_f334r8_connectors.jpg :align: center :alt: Nucleo F334R8 connectors Default Zephyr Peripheral Mapping: ---------------------------------- - UART_1 TX/RX : PA9/PA10 - UART_2 TX/RX : PA2/PA3 (ST-Link Virtual Port Com) - UART_3 TX/RX : PB10/PB11 - I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) - SPI1 CS/SCK/MISO/MOSI : PB6/PA5/PA6/PA7 (Arduino SPI) - PWM_1_CH1 : PA8 - USER_PB : PC13 - LD2 : PA5 For more details please refer to `STM32 Nucleo-64 board User Manual`_. Programming and Debugging ************************* Applications for the ``nucleo_f334r8`` board configuration can be built and flashed in the usual way (see :ref:`build_an_application` and :ref:`application_run` for more details). Flashing ======== Nucleo F334R8 board includes an ST-LINK/V2-1 embedded debug tool interface. This interface is supported by the openocd version included in Zephyr SDK. Flashing an application to Nucleo F334R8 ---------------------------------------- Connect the Nucleo F334R8 to your host computer using the USB port, then build and flash an application. Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_f334r8 :goals: build flash You will see the LED blinking every second. Debugging ========= You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`blinky` application. .. zephyr-app-commands:: :zephyr-app: samples/basic/blinky :board: nucleo_f334r8 :maybe-skip-config: :goals: debug References ********** .. target-notes:: .. _Nucleo F334R8 website: path_to_url .. _STM32F334 reference manual: path_to_url .. _STM32 Nucleo-64 board User Manual: path_to_url ```
/content/code_sandbox/boards/st/nucleo_f334r8/doc/index.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,388
```unknown # enable uart driver CONFIG_SERIAL=y # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y #enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_l496zg/nucleo_l496zg_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
74
```unknown /* * */ / { arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map = <0 0 &gpioa 3 0>, /* A0 */ <1 0 &gpioc 0 0>, /* A1 */ <2 0 &gpioc 3 0>, /* A2 */ <3 0 &gpioc 1 0>, /* A3 */ <4 0 &gpioc 4 0>, /* A4 */ <5 0 &gpioc 5 0>, /* A5 */ <6 0 &gpiod 9 0>, /* D0 */ <7 0 &gpiod 8 0>, /* D1 */ <8 0 &gpiof 15 0>, /* D2 */ <9 0 &gpioe 13 0>, /* D3 */ <10 0 &gpiof 14 0>, /* D4 */ <11 0 &gpioe 11 0>, /* D5 */ <12 0 &gpioe 9 0>, /* D6 */ <13 0 &gpiof 13 0>, /* D7 */ <14 0 &gpiof 12 0>, /* D8 */ <15 0 &gpiod 15 0>, /* D9 */ <16 0 &gpiod 14 0>, /* D10 */ <17 0 &gpioa 7 0>, /* D11 */ <18 0 &gpioa 6 0>, /* D12 */ <19 0 &gpioa 5 0>, /* D13 */ <20 0 &gpiob 9 0>, /* D14 */ <21 0 &gpiob 8 0>; /* D15 */ }; }; arduino_i2c: &i2c1 {}; arduino_spi: &spi1 {}; arduino_serial: &lpuart1 {}; ```
/content/code_sandbox/boards/st/nucleo_l496zg/arduino_r3_connector.dtsi
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
501
```unknown # STM32L496ZG Nucleo board configuration if BOARD_NUCLEO_L496ZG config SPI_STM32_INTERRUPT default y depends on SPI endif # BOARD_NUCLEO_L496ZG ```
/content/code_sandbox/boards/st/nucleo_l496zg/Kconfig.defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
52
```ini source [find board/st_nucleo_l4.cfg] $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt gdb_breakpoint_override hard } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } ```
/content/code_sandbox/boards/st/nucleo_l496zg/support/openocd.cfg
ini
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
67
```unknown # Enable MPU CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y CONFIG_SERIAL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y # enable GPIO CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y # enable pin controller CONFIG_PINCTRL=y ```
/content/code_sandbox/boards/st/nucleo_f429zi/nucleo_f429zi_defconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
68
```cmake board_runner_args(jlink "--device=STM32F429ZI" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) ```
/content/code_sandbox/boards/st/nucleo_f429zi/board.cmake
cmake
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56