Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
How can I use CAN with STM32F303K8 ?
How can I declare the CAN pins?
2 Answers
8 years, 12 months ago.
Hello, Unfortunately there is no support for ST NUCLEO CAN peripherals in the mbed library yet. But you have the opportunity to support the mbed community by testing a user CAN library for NUCLEO boards with the NUCLEO-F303K8. In case you are interested, there is a demo available to start with. CAN pins are defined at line #47
CAN can(PA_11, PA_12); /* CAN Rx pin name, CAN Tx pin name */
Your feedback is welcome and appreciated. Thank you in advance.
NOTE: At least two CAN nodes must be connected to the same CAN bus terminated with 120 Ohm resistors at either ends.
8 years, 10 months ago.
Just wondered whether this had changed yet? I was planning on using the STM32F303K8 but after finding out the CAN isn't working in MBED I am worried. Does it totally not work? I only need to send and receive a few bytes to 1 or 2 slaves, even at low-ish speeds.
The CAN hardware is fine. The issue is that ST never implemented that part of the mbed library on their parts which means any code attempting to use the mbed CAN library will fail to compile.
With the correct 3rd part library (see Zoltan's post for an attempt at one) there is no reason why the CAN can't be made to work perfectly for the ST parts.
CAN works fin on any NXP based boards if you have an option to change board.
posted by 03 Feb 2016Hi Sam, don't worry. As Andy said, the hardware for CAN peripheral on NUCLEO boards is OK and there are many ways how to make it work with mbed. One option is to use the CANnucleo library. The demo program was recently renamed and now is available here. Since the wiki Homepage does not open automatically any more, for more details have a look at here and here.
posted by 03 Feb 2016
How can I use pwm 50 hz in STM32F303K8 ? is there any docs ?
posted by Khemiri Mahrane 08 Feb 2016