Zephyr: Clock setup fixed and LEDs implemented
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Kconfig - STM32 Nucleo-64 development board with STM32L073RZ MCU configuration
|
||||
# Kconfig - Libre Solar MPPT 1210 HUS v0.4
|
||||
#
|
||||
# Copyright (c) 2018 Ilya Tagunov <tagunil@gmail.com>
|
||||
# Copyright (c) 2019 Martin Jäger (Libre Solar)
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
config BOARD_NUCLEO_L073RZ
|
||||
bool "NUCLEO-64 L073RZ Development Board"
|
||||
config BOARD_MPPT1210HUS_0V4
|
||||
bool "Libre Solar MPPT 1210 HUS v0.4"
|
||||
depends on SOC_STM32L073XX
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Kconfig - STM32 Nucleo-64 development board with STM32L073RZ MCU
|
||||
# Kconfig - Libre Solar MPPT 1210 HUS v0.4
|
||||
#
|
||||
# Copyright (c) 2018 Ilya Tagunov <tagunil@gmail.com>
|
||||
# Copyright (c) 2019 Martin Jäger (Libre Solar)
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
if BOARD_NUCLEO_L073RZ
|
||||
if BOARD_MPPT1210HUS_0V4
|
||||
|
||||
config BOARD
|
||||
default "nucleo_l073rz"
|
||||
default "mppt1210hus_0v4"
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
@@ -34,4 +34,4 @@ config SPI_STM32_INTERRUPT
|
||||
|
||||
endif # SPI
|
||||
|
||||
endif # BOARD_NUCLEO_L073RZ
|
||||
endif # BOARD_MPPT1210HUS_0V4
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Ilya Tagunov <tagunil@gmail.com>
|
||||
* Copyright (c) 2019 Martin Jäger (Libre Solar)
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -20,14 +20,39 @@
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
green_led_2: led_2 {
|
||||
gpios = <&gpioa 5 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "User LD2";
|
||||
led_pin_gnd: led_gnd {
|
||||
gpios = <&gpiob 14 GPIO_INT_ACTIVE_LOW>;
|
||||
label = "LED GND";
|
||||
};
|
||||
led_pin_soc12: led_soc12 {
|
||||
gpios = <&gpiob 13 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "LED SOC12";
|
||||
};
|
||||
led_pin_soc3: led_soc3 {
|
||||
gpios = <&gpiob 2 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "LED SOC3";
|
||||
};
|
||||
led_pin_rxtx: led_rxtx {
|
||||
gpios = <&gpiob 11 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "LED RXTX";
|
||||
};
|
||||
led_pin_load: led_load {
|
||||
gpios = <&gpiob 10 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "LED Load";
|
||||
};
|
||||
pin_usb_pwr_en: tmp_usb_pwr_en {
|
||||
gpios = <&gpiob 12 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "USB power enable";
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &green_led_2;
|
||||
led-a = &led_pin_gnd;
|
||||
led-b = &led_pin_soc12;
|
||||
led-c = &led_pin_soc3;
|
||||
led-d = &led_pin_rxtx;
|
||||
led-e = &led_pin_load;
|
||||
usb-pwr-en = &pin_usb_pwr_en;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ CONFIG_SOC_SERIES_STM32L0X=y
|
||||
|
||||
# Platform Configuration
|
||||
CONFIG_SOC_STM32L073XX=y
|
||||
CONFIG_BOARD_NUCLEO_L073RZ=y
|
||||
CONFIG_BOARD_MPPT1210HUS_0V4=y
|
||||
|
||||
# General Kernel Options
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
@@ -29,16 +29,9 @@ CONFIG_GPIO=y
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
# SYSCLK selection
|
||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||
# HSE configuration
|
||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
||||
# however, the board does not have an external oscillator, so just use
|
||||
# the 8MHz clock signal coming from integrated STLink
|
||||
CONFIG_CLOCK_STM32_HSE_BYPASS=y
|
||||
# PLL configuration
|
||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
||||
# produce 32MHz clock at PLL output
|
||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=8
|
||||
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=4
|
||||
CONFIG_CLOCK_STM32_PLL_DIVISOR=2
|
||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Ilya Tagunov <tagunil@gmail.com>
|
||||
* Copyright (c) 2019 Martin Jäger (Libre Solar)
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <pinmux/stm32/pinmux_stm32.h>
|
||||
|
||||
/* pin assignments for NUCLEO-L073RZ board */
|
||||
/* pin assignments for Libre Solar MPPT board */
|
||||
static const struct pin_config pinconf[] = {
|
||||
#ifdef CONFIG_UART_1
|
||||
{STM32_PIN_PA9, STM32L0_PINMUX_FUNC_PA9_USART1_TX},
|
||||
|
||||
Reference in New Issue
Block a user