Hi. I’m trying to set up a uavcan-node on a STM32F098CC6 MCU which will publish sensor-data. I’m currently stuck at setting up the driver and library for my project. I’ve come as far as reducing errors down to three, which appear to be due to configuration issues.
I configured for BAREMETAL, one Interface and timer number 2 in build_config.hpp.
In my chip.h I have:
#include "stm32f0xx.h" #include "stm32f0xx_hal.h" #define STM32F0XX #define STM32_PCLK1 (42000000ul) #define STM32_TIMCLK1 (42000000ul) (Actually using TIMCLK2, but compilation demanded for definition of TIMCLK1) #define RCC_APB1ENR_CAN1EN RCC_APB1ENR_CANEN #define RCC_APB1RSTR_CAN1RST RCC_APB1RSTR_CANRST (erroneous:)#define CAN1_RX1_IRQn CAN_RX1_IRQn #define CAN1_TX_IRQHandler CAN1_TX_IRQHandler #define CAN1_RX0_IRQHandler CAN1_RX0_IRQHandler #define CAN1_RX1_IRQHandler CAN1_RX1_IRQHandler
of which yields a ‘CAN_RX1_IRQn’ was not declared in this scope error.
I tracked the error to nvicEnableVector(CAN1_RX0_IRQn, UAVCAN_STM32_IRQ_PRIORITY_MASK); in uc_stm32_can.cpp which demands the parameter to be of uint_t32 type. Hence, I speculate that what actually should be defined here is some kind of register-adress.
I have the same problem with ‘USB_HP_CAN1_TX_IRQn’ and ‘USB_LP_CAN1_RX0_IRQn’ from uc_stm32_can.cpp.
Can you affirm my speculations and help me find the corresponding registers, for example as per spelling out their respective names? Or am I wrong entirely?
Also; are some of my configurations nonsensical or superfluous?
Thanks a lot!