Hi everybody,
I’m attempting to develop a UAVCAN subscriber node while using an STM Nucleo board and RTOS. I’m using the Nucleo STM32F303RE.
I have followed the examples in this repo: https://github.com/raimapo/UAVCAN-examples which I find to be very simple and easy to understand. I’m using the exact same files as the author is as a library.
I have defined the chip.h file manually (as I’m using the latest cubeMx auto-configuration and it is not generated by default)
It goes like this:
chip.h file
#ifndef CHIP_UAVCAN_CONFIG_H
#define CHIP_UAVCAN_CONFIG_H
#include <stm32f3xx.h>
#define STM32F3XX
#define CAN1_TX_IRQHandler CAN_TX_IRQHandler // was CAN1_TX_IRQHandler in example
#define CAN1_RX0_IRQHandler CAN_RX0_IRQHandler // was CAN1_RX0_IRQHandler in example
#define CAN1_RX1_IRQHandler CAN_RX1_IRQHandler // was CAN1_RX1_IRQHandler in example
#define STM32_PCLK1 (36000000ul) // was 42000000ul in example
#define STM32_TIMCLK1 (72000000ul) // was 84000000ul in example
#endif
Also, I have defined these variables:
UAVCAN_CPP_VERSION=UAVCAN_CPP11
UAVCAN_STM32_FREERTOS=1
UAVCAN_STM32_TIMER_NUMBER=2
UAVCAN_STM32_NUM_IFACES=1
Lastly, the only difference with the shown examples are the GPIO CAN configs, like this:
//CAN1 GPIO Configuration
//PB8 , d15 ------> CAN1_RX
//PB9 , d14 ------> CAN1_TX
GPIO_InitTypeDef GPIO_InitStruct = {0};
__HAL_RCC_CAN1_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Alternate = GPIO_MODE_AF_PP;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
When in the task, on the node.start() the whole system freezes…
I have checked this topic as well here.
Is there anything I am missing?
Do I need to manually setup the Timer or does the code do it by itself?
Thank you, any information would be greatly appreciated, best regards!
or maybe some day by visiting TalTech I visit Zubax