1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/nucleo-f767zi: add ADC support

This commit is contained in:
AravindKarri 2020-12-28 19:23:13 +01:00 committed by Benjamin Valentin
parent 63252d17c0
commit e9691e61c2
3 changed files with 23 additions and 0 deletions

View File

@ -15,6 +15,7 @@ config BOARD_NUCLEO_F767ZI
select CPU_MODEL_STM32F767ZI
# Put defined MCU peripherals here (in alphabetical order)
select HAS_PERIPH_ADC
select HAS_PERIPH_DMA
select HAS_PERIPH_I2C
select HAS_PERIPH_RTC

View File

@ -2,6 +2,7 @@ CPU = stm32
CPU_MODEL = stm32f767zi
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_dma
FEATURES_PROVIDED += periph_eth
FEATURES_PROVIDED += periph_i2c

View File

@ -185,7 +185,28 @@ static const eth_conf_t eth_config = {
};
#define ETH_DMA_ISR isr_dma2_stream0
/** @} */
/**
* @name ADC configuration
*
* Note that we do not configure all ADC channels,
* and not in the STM32F767ZI order. Instead, we
* just define 6 ADC channels, for the Nucleo
* Arduino header pins A0-A5
*
* @{
*/
static const adc_conf_t adc_config[] = {
{GPIO_PIN(PORT_A, 3), 0, 0},
{GPIO_PIN(PORT_C, 0), 0, 1},
{GPIO_PIN(PORT_C, 3), 0, 4},
{GPIO_PIN(PORT_F, 3), 0, 8},
{GPIO_PIN(PORT_F, 5), 0, 11},
{GPIO_PIN(PORT_F, 10), 0, 10},
};
#define ADC_NUMOF ARRAY_SIZE(adc_config)
/** @} */
#ifdef __cplusplus