STM32 Nucleo-L476RG

Support for the STM32 Nucleo-L476RG.

MCU

MCU
Family ARM Cortex-M4
Vendor ST Microelectronics
RAM
Flash
Frequency
FPU
Timers
ADCs
UARTs
SPIs
I2Cs
RTC
Vcc
Datasheet
Reference Manual Reference Manual
Programming Manual Programming Manual
Board Manual

CLOCK_HSE
1
(0)
CLOCK_LSE
1
(0)
CLOCK_MSI_ENABLE
1
(1)
CLOCK_MSI_LSE_PLL
1
(0)
CLOCK_CORECLOCK
1
(80000000U)
CLOCK_PLL_M
1
(6)
CLOCK_PLL_N
1
(20)
CLOCK_PLL_R
1
(2)
CLOCK_AHB_DIV
1
RCC_CFGR_HPRE_DIV1
CLOCK_AHB
1
(CLOCK_CORECLOCK / 1)
CLOCK_APB1_DIV
1
RCC_CFGR_PPRE1_DIV4
CLOCK_APB1
1
(CLOCK_CORECLOCK / 4)
CLOCK_APB2_DIV
1
RCC_CFGR_PPRE2_DIV2
CLOCK_APB2
1
(CLOCK_CORECLOCK / 2)
const timer_conf_t timer_config()
1
2
3
4
5
6
7
8
9
= {
    {
        .dev      = TIM5,
        .max      = 0xffffffff,
        .rcc_mask = RCC_APB1ENR1_TIM5EN,
        .bus      = APB1,
        .irqn     = TIM5_IRQn
    }
}
TIMER_0_ISR
1
isr_tim5
TIMER_NUMOF
1
(sizeof(timer_config) / sizeof(timer_config[0]))
const uart_conf_t uart_config()
UART_0_ISR
1
(isr_usart2)
UART_1_ISR
1
(isr_usart3)
UART_2_ISR
1
(isr_usart1)
UART_NUMOF
1
(sizeof(uart_config) / sizeof(uart_config[0]))
const pwm_conf_t pwm_config()
PWM_NUMOF
1
(sizeof(pwm_config) / sizeof(pwm_config[0]))
const uint8_t spi_divtable()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
= {
    {       
        7,  
        5,  
        3,  
        1,  
        0   
    },
    {       
        7,  
        6,  
        4,  
        2,  
        1   
    }
}
const spi_conf_t spi_config()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
= {
    {
        .dev      = SPI1,
        .mosi_pin = GPIO_PIN(PORT_A, 7),
        .miso_pin = GPIO_PIN(PORT_A, 6),
        .sclk_pin = GPIO_PIN(PORT_A, 5),
        .cs_pin   = GPIO_UNDEF,
        .af       = GPIO_AF5,
        .rccmask  = RCC_APB2ENR_SPI1EN,
        .apbbus   = APB2
    }
}
SPI_NUMOF
1
(sizeof(spi_config) / sizeof(spi_config[0]))
const i2c_conf_t i2c_config()
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
= {
    {
        .dev            = I2C1,
        .speed          = I2C_SPEED_NORMAL,
        .scl_pin        = GPIO_PIN(PORT_B, 8),
        .sda_pin        = GPIO_PIN(PORT_B, 9),
        .scl_af         = GPIO_AF4,
        .sda_af         = GPIO_AF4,
        .bus            = APB1,
        .rcc_mask       = RCC_APB1ENR1_I2C1EN,
        .irqn           = I2C1_ER_IRQn,
    }
}
I2C_0_ISR
1
isr_i2c1_er
I2C_NUMOF
1
(sizeof(i2c_config) / sizeof(i2c_config[0]))
ADC_NUMOF
1
(6U)
ADC_CONFIG
1
2
3
4
5
6
7
8
{             \
    {GPIO_PIN(PORT_A, 0), 0, 5},  /*< ADC12_IN5 */   \
    {GPIO_PIN(PORT_A, 1), 0, 6},  /*< ADC12_IN6 */   \
    {GPIO_PIN(PORT_A, 4), 1, 9},  /*< ADC12_IN9 */   \
    {GPIO_PIN(PORT_B, 0), 1, 15}, /*< ADC12_IN15 */  \
    {GPIO_PIN(PORT_C, 1), 2, 2},  /*< ADC123_IN_2 */ \
    {GPIO_PIN(PORT_C, 0), 2, 1},  /*< ADC123_IN_1 */ \
}
RTT_NUMOF
1
(1)
RTT_FREQUENCY
1
(1024U)             /* 32768 / 2^n */
RTT_MAX_VALUE
1
(0x0000ffff)        /* 16-bit timer */
RTC_NUMOF
1
(1)