pazi88 / STM32_CAN

CAN bus Library for Arduino STM32
GNU General Public License v3.0
67 stars 28 forks source link

Error compiling code #12

Closed sam-tj closed 4 months ago

sam-tj commented 1 year ago

Hi, there is an error while compiling sample write code .

STM32_CAN/STM32_CAN.h:123:26: error: expected ')' before '*' token
  123 |     STM32_CAN(CAN_TypeDef* canPort, CAN_PINS pins, RXQUEUE_TABLE rxSize = RX_SIZE_16, TXQUEUE_TABLE txSize = TX_SIZE_16);
designer2k2 commented 1 year ago

Hello, can you share the complete code? and what target for are you compiling?

Using latest arduino ide 2.1.0 and STMicroelectronics platform 2.5.0? (this is the setup that is working here)

sam-tj commented 1 year ago

I am using arduino 2.0.4 with stm32 framework 2.5.0.

The code is one of the examples, CAN write.

My board config is the following,

pazi88 commented 1 year ago

I am using arduino 2.0.4 with stm32 framework 2.5.0.

The code is one of the examples, CAN write.

My board config is the following,

  • Nucleo 144
  • Nucleo H723ZG

I can reproduce this. Seems to be something to do with the board itself. Looking at the spec sheet, the H723 has FDCAN interface, instead of the plain old regular CAN. It probably needs some special handling (or worst case, totally different library). I'll look into that.

sam-tj commented 1 year ago

Thanks, I will wait for your reply.

pazi88 commented 1 year ago

Thanks, I will wait for your reply.

The HAL driver file seems identical to others. This is probably some missing define somewhere. Difficulty is to try to find that...

sam-tj commented 1 year ago

In any way I could help?

pazi88 commented 1 year ago

In any way I could help?

Oh sorry I looked at wrong place. The H7xx indeed has FDCAN driver, not CAN driver. And those are different. I'll try to implement usage of that too in this library. But it looks like it requires quite a bit of work, so it won't be ready anytime soon.

benjineeering commented 6 months ago

Same issue here with a STM32G431VBT6 would be nice to have this working on CANFD controller

Hitomamacs commented 5 months ago

do we have an eta of when this feature will be released?

pazi88 commented 5 months ago

do we have an eta of when this feature will be released?

Sorry no. It's on my to-do list, but I haven't found time to implement it. I'm happy to accept pull requests if someone else implements it.