boards: arm: b_l072z_lrwan1: Enable the USB controller
The STM32L072CZ MCU has a built-in USB device controller which is supported by Zephyr's USB STM32 driver. The b_l072z_lrwan1 board has a micro-USB connector that is wired to the MCU via two solder bridges (SB15 and SB16) that need to be closed to connect the data lines. Update the board documentation to describe the solder bridges and enable the USB controller in the device tree. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
This commit is contained in:
parent
ec9ce92d1f
commit
aec341e677
4 changed files with 24 additions and 1 deletions
|
@ -95,3 +95,7 @@ arduino_i2c: &i2c1 {};
|
|||
&eeprom {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -99,7 +99,7 @@ The STM32L072CZ SoC provides the following hardware IPs:
|
|||
- 2x ultra-low-power comparators
|
||||
- 11x communication interfaces
|
||||
|
||||
- USB OTG 2.0 full-speed, LPM and BCD
|
||||
- USB 2.0 full-speed device, LPM and BCD
|
||||
- 3x I2C FM+(1 Mbit/s), SMBus/PMBus
|
||||
- 4x USARTs (ISO 7816, LIN, IrDA, modem)
|
||||
- 6x SPIs (4x SPIs with the Quad SPI)
|
||||
|
@ -139,6 +139,8 @@ The Zephyr B-L072Z-LRWAN1 Discovery board configuration supports the following h
|
|||
+-----------+------------+-------------------------------------+
|
||||
| EEPROM | on-chip | eeprom |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| USB | on-chip | usb |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Other hardware features are not yet supported on this Zephyr port.
|
||||
|
||||
|
@ -177,6 +179,13 @@ Serial Port
|
|||
B-L072Z-LRWAN1 Discovery board has 2 U(S)ARTs. The Zephyr console output is assigned to UART2.
|
||||
Default settings are 115200 8N1.
|
||||
|
||||
USB device
|
||||
----------
|
||||
|
||||
B-L072Z-LRWAN1 Discovery board has 1 USB device controller. However,
|
||||
the USB data lines are not connected to the MCU by default. To connect
|
||||
the USB data lines to the MCU, short solder bridges SB15 and SB16.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
{STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32L0_PINMUX_FUNC_PA11_USB_DM},
|
||||
{STM32_PIN_PA12, STM32L0_PINMUX_FUNC_PA12_USB_DP},
|
||||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -130,6 +130,12 @@
|
|||
#define STM32L0_PINMUX_FUNC_PC3_SPI2_MOSI \
|
||||
(STM32_PINMUX_ALT_FUNC_2 | STM32_PUPDR_PULL_DOWN)
|
||||
|
||||
/* USB */
|
||||
#define STM32L0_PINMUX_FUNC_PA11_USB_DM \
|
||||
STM32_MODER_INPUT_MODE
|
||||
#define STM32L0_PINMUX_FUNC_PA12_USB_DP \
|
||||
STM32_MODER_INPUT_MODE
|
||||
|
||||
#define STM32L0_PINMUX_FUNC_PC0_ADC_IN10 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
#define STM32L0_PINMUX_FUNC_PC1_ADC_IN11 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue