mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/nucleo-f722ze: Add periph_can support
cpu/stm32: Add CAN support for f722ze board f722ze board has ONLY 1 CAN interface, fix compiling error which treats f722xx has more than 1 CAN.
This commit is contained in:
parent
e8cc3c6194
commit
a38cd1477e
@ -21,6 +21,7 @@ config BOARD_NUCLEO_F722ZE
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
select HAS_PERIPH_CAN
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
@ -8,6 +8,7 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
FEATURES_PROVIDED += periph_can
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
@ -43,11 +43,13 @@ static const can_conf_t candev_conf[] = {
|
||||
.rcc_mask = RCC_APB1ENR1_CAN1EN,
|
||||
#else
|
||||
.rcc_mask = RCC_APB1ENR_CAN1EN,
|
||||
#if CANDEV_STM32_CHAN_NUMOF > 1
|
||||
.can_master = CAN1,
|
||||
.master_rcc_mask = RCC_APB1ENR_CAN1EN,
|
||||
.first_filter = 0,
|
||||
.nb_filters = 14,
|
||||
#endif
|
||||
#endif
|
||||
#if defined(CPU_FAM_STM32F1)
|
||||
.rx_pin = GPIO_PIN(PORT_A, 11),
|
||||
.tx_pin = GPIO_PIN(PORT_A, 12),
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
||||
#elif defined(CPU_FAM_STM32F1) || defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4)
|
||||
#define CANDEV_STM32_CHAN_NUMOF 2
|
||||
#elif defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3) || \
|
||||
defined(CPU_FAM_STM32L4) || DOXYGEN
|
||||
defined(CPU_FAM_STM32L4) || defined(CPU_LINE_STM32F722xx) || DOXYGEN
|
||||
/** Number of channels in the device (up to 3) */
|
||||
#define CANDEV_STM32_CHAN_NUMOF 1
|
||||
#else
|
||||
@ -137,7 +137,6 @@ typedef struct {
|
||||
/** The number of receive FIFO */
|
||||
#define CAN_STM32_RX_MAILBOXES 2
|
||||
|
||||
|
||||
#ifndef CAN_STM32_RX_MAIL_FIFO
|
||||
/** This is the maximum number of frame the driver can receive simultaneously */
|
||||
#define CAN_STM32_RX_MAIL_FIFO 12
|
||||
|
Loading…
Reference in New Issue
Block a user