iotlab/include/periph_conf_common.h

Peripheral MCU configuration for the iotlab-m3 board.

CLOCK_CORECLOCK
1
(72000000U)
CLOCK_HSE
1
(16000000U)
CLOCK_LSE
1
(1)
CLOCK_AHB_DIV
1
RCC_CFGR_HPRE_DIV1
CLOCK_AHB
1
(CLOCK_CORECLOCK / 1)
CLOCK_APB1_DIV
1
RCC_CFGR_PPRE1_DIV2     /* max 36MHz */
CLOCK_APB1
1
(CLOCK_CORECLOCK / 2)
CLOCK_APB2_DIV
1
RCC_CFGR_PPRE2_DIV1     /* max 72MHz */
CLOCK_APB2
1
(CLOCK_CORECLOCK / 1)
CLOCK_PLL_PREDIV
1
(2)
CLOCK_PLL_MUL
1
(9)
ADC_CONFIG
1
2
3
4
{       \
    { GPIO_PIN(PORT_A,3), 0, 3  },  \
    { GPIO_UNDEF        , 0, 16 },  \
    { GPIO_UNDEF        , 0, 17 } }
ADC_NUMOF
1
(3)
TIMER_0_ISR
1
isr_tim2
TIMER_1_ISR
1
isr_tim3
TIMER_NUMOF
1
(sizeof(timer_config) / sizeof(timer_config[0]))
const timer_conf_t timer_config()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
= {
    {
        .dev      = TIM2,
        .max      = 0x0000ffff,
        .rcc_mask = RCC_APB1ENR_TIM2EN,
        .bus      = APB1,
        .irqn     = TIM2_IRQn
    },
    {
        .dev      = TIM3,
        .max      = 0x0000ffff,
        .rcc_mask = RCC_APB1ENR_TIM3EN,
        .bus      = APB1,
        .irqn     = TIM3_IRQn
    }
}
UART_0_ISR
1
(isr_usart1)
UART_1_ISR
1
(isr_usart2)
UART_NUMOF
1
(sizeof(uart_config) / sizeof(uart_config[0]))
const uart_conf_t uart_config()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
= {
    {
        .dev      = USART1,
        .rcc_mask = RCC_APB2ENR_USART1EN,
        .rx_pin   = GPIO_PIN(PORT_A, 10),
        .tx_pin   = GPIO_PIN(PORT_A, 9),
        .bus      = APB2,
        .irqn     = USART1_IRQn
    },
    {
        .dev      = USART2,
        .rcc_mask = RCC_APB1ENR_USART2EN,
        .rx_pin   = GPIO_PIN(PORT_A, 3),
        .tx_pin   = GPIO_PIN(PORT_A, 2),
        .bus      = APB1,
        .irqn     = USART2_IRQn
    }
}
RTT_NUMOF
1
(1U)
RTT_IRQ_PRIO
1
1
RTT_DEV
1
RTC
RTT_IRQ
1
RTC_IRQn
RTT_ISR
1
isr_rtc
RTT_MAX_VALUE
1
(0xffffffff)
RTT_FREQUENCY
1
(1)             /* in Hz */
RTT_PRESCALER
1
(0x7fff)        /* run with 1 Hz */
I2C_0_ISR
1
isr_i2c1_ev
I2C_NUMOF
1
(sizeof(i2c_config) / sizeof(i2c_config[0]))
const i2c_conf_t i2c_config()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
= {
    {
        .dev            = I2C1,
        .speed          = I2C_SPEED_NORMAL,
        .scl_pin        = GPIO_PIN(PORT_B, 6),
        .sda_pin        = GPIO_PIN(PORT_B, 7),
        .bus            = APB1,
        .rcc_mask       = RCC_APB1ENR_I2C1EN,
        .clk            = CLOCK_APB1,
        .irqn           = I2C1_EV_IRQn
    }
}
const uint8_t spi_divtable()

Shared SPI clock div table.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
= {
    {       
        7,  
        6,  
        4,  
        2,  
        1   
    },
    {       
        7,  
        7,  
        5,  
        3,  
        2   
    }
}

Note

The spi_divtable is auto-generated from cpu/stm32_common/dist/spi_divtable/spi_divtable.c