6 years, 6 months ago.

Nucleo-F091RC: Compiler error in CAN bus program


I am trying to develop CAN application using Nucleo-F091RC. I am getting following compiler error. I have just created an object of CAN class which is available in mbed library.


I have already tried building a CAN program on mbed LPC1768. There it compiled without any problem. I am not able to understand this compiler error. Can you please suggest a solution?



This type of error normally means you have chosen / using incorrect pins for the function, in your case CAN. At the moment i can't see what pins should be used.

EDIT: Your pin selection appears to be correct. Maybe CAN has not been implemented yet, or a syntax error i don't see?

posted by David Fletcher 29 Mar 2015

1 Answer

6 years, 6 months ago.

Download STM32CubeMX and paste the output into your mbed program it should work. I just tried and it compiles ok, but i don't have anything to test using CAN. Try it and post back on how you get on. Try this /media/uploads/dflet/nucleo_ticker_f091rc.zip .

Accepted Answer

Hi David,

I imported mbed-src library just to locate CAN functions and files. I could see no CAN API file for Nucleo-F091RC, although it is available for other targets like mbed-LPC1768.

So solution was to use your code . I just pasted your code in main.cpp and it worked.



posted by Abhijeet Badurkar 03 Apr 2015

Hi Do you have an example using the can interface for the nucleo ?

posted by frank dunn 20 Jun 2015