Topics

STM32L4 CAN Driver status


leonard.bise@...
 

Hello Alexander,

I would like to use the STM32L4 CAN driver, as I understand you were the one that coded it, I wanted to ask if you could provide a status on this?
I tried to compile the samples/drivers/CAN sample on the master branch for the nucleo_l432kc board and I get compilation errors related to the CAN_InitTypeDef type in the HAL.

/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:245:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘TTCM’
  hcan.Init.TTCM = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:246:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘ABOM’
  hcan.Init.ABOM = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:247:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘AWUM’
  hcan.Init.AWUM = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:248:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘NART’
  hcan.Init.NART = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:249:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘RFLM’
  hcan.Init.RFLM = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:250:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘TXFP’
  hcan.Init.TXFP = DISABLE;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:252:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘SJW’
  hcan.Init.SJW  = swj;
           ^
/home/lbise/gitrepo/zephyr/drivers/can/stm32_can.c:253:11: error: ‘CAN_InitTypeDef {aka struct <anonymous>}’ has no member named ‘BS1’
  hcan.Init.BS1  = bs1;

Is there something broken or is it on my end?
Thanks.

Best regards,
Léonard.