Arm Mbed OS support forum

There is special API for FDCAN?

Hello,
I try to carry my code from STM32F469ZITx to STM32L552RE.
I obtain the error message " unknown type name ‘CANMessage’".
The hardware difference is CAN (STM32F469ZITx) becomes FDCAN (STM32L552RE).
There is special API for FDCAN ? If yes how to use it ?
Thanks for advance.

Hello,

I do not know about an Mbed CANFD API - Full API list - API references and tutorials | Mbed OS 6 Documentation

It seems like the CAN API is not enabled for whole family STM32L5 like for STM32F469, just try to add it in mbed_app.json file and you will see.

BR, Jan

Hello,
I have created my own target. It’s enough ?
“MYL552”: {
“inherits”: [
“MCU_STM32L552xE”
],
“device_has_add”: [
“ANALOGOUT”,
“TRNG”,
“CAN”
],
}

Probably yes.

BR, Jan

Hello,
Now i still have “unknown type name ‘CANMessage’” with STM32L5
Information, i use meb-os 6.8.0
What’s wrong ?
Thanks for advance

Hello,

I do not know, it seems like your settings is ignored.
However, I tried that with Nucleo-L552ZE-Q and I added the CAN via mbed_app.json file. I had no errors about CAN or CANMesage but another one from this line.
The CAN_HandleTypeDef CanHandle; probably may be FDCAN_HandleTypeDef CanHandle; but that still not solve the problem and the compiler trow many more erros from mbed-os/can_api.c

So from my point of view, currently the CAN API is not implemented for this target/L5 family in MbedOS.

BR, Jan

Hello @jeromecoutant,

can you please share some informations about state of CAN API for L5 family under MbedOS.
Thank you

BR, Jan

Hi Jan

I agree that CAN porting layer has maybe not been updated for STM32L5.
I added it in my todo list :slight_smile:

1 Like

Hi
Please check STM32L5/STM32U5 : CAN suport by jeromecoutant · Pull Request #15065 · ARMmbed/mbed-os · GitHub
Regards,
Jerome

1 Like

It’s done.
It’s okay
Thanks a lot.