Skip to content

Commit

Permalink
boards: nucleo_wb55rg: Enable ADC
Browse files Browse the repository at this point in the history
Enable ADC on nucleo_wb55rg

Signed-off-by: Rick Conrey <rick.conrey@witiproducts.com>
  • Loading branch information
witi-manufacturing authored and galak committed Jul 31, 2019
1 parent 8e62304 commit 710ab47
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions boards/arm/nucleo_wb55rg/Kconfig.defconfig
Expand Up @@ -44,6 +44,13 @@ config SPI_1


endif # SPI endif # SPI


if ADC

config ADC_1
default y

endif # ADC

if BT_DEBUG_MONITOR if BT_DEBUG_MONITOR


config LPUART_1 config LPUART_1
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_wb55rg/doc/nucleowb55rg.rst
Expand Up @@ -166,6 +166,8 @@ The Zephyr nucleo_wb55rg board configuration supports the following hardware fea
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| PWM | on-chip | pwm | | PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+ +-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+


Other hardware features are not yet supported on this Zephyr port. Other hardware features are not yet supported on this Zephyr port.


Expand Down Expand Up @@ -199,6 +201,7 @@ Default Zephyr Peripheral Mapping:
- SPI_1_MISO : PA6 (arduino_spi) - SPI_1_MISO : PA6 (arduino_spi)
- SPI_1_MOSI : PA7 (arduino_spi) - SPI_1_MOSI : PA7 (arduino_spi)
- PWM_2 CH 1 : PA0 - PWM_2 CH 1 : PA0
- ADC_1_CH3 : PC2


System Clock System Clock
------------ ------------
Expand Down
4 changes: 4 additions & 0 deletions boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
Expand Up @@ -93,6 +93,10 @@ arduino_serial: &lpuart1 {
status = "okay"; status = "okay";
}; };


&adc1 {
status = "okay";
};

&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
Expand Down
1 change: 1 addition & 0 deletions boards/arm/nucleo_wb55rg/nucleo_wb55rg.yaml
Expand Up @@ -15,3 +15,4 @@ supported:
- counter - counter
- spi - spi
- pwm - pwm
- adc
3 changes: 3 additions & 0 deletions boards/arm/nucleo_wb55rg/pinmux.c
Expand Up @@ -39,6 +39,9 @@ static const struct pin_config pinconf[] = {
#ifdef CONFIG_PWM_STM32_2 #ifdef CONFIG_PWM_STM32_2
{STM32_PIN_PA0, STM32WBX_PINMUX_FUNC_PA0_TMR2_CH1}, {STM32_PIN_PA0, STM32WBX_PINMUX_FUNC_PA0_TMR2_CH1},
#endif /* CONFIG_PWM_STM32_2 */ #endif /* CONFIG_PWM_STM32_2 */
#ifdef CONFIG_ADC_1
{STM32_PIN_PC2, STM32WBX_PINMUX_FUNC_PC2_ADC1_IN3},
#endif /* CONFIG_ADC_1 */
}; };


static int pinmux_stm32_init(struct device *port) static int pinmux_stm32_init(struct device *port)
Expand Down

0 comments on commit 710ab47

Please sign in to comment.