Skip to main content
Visitor II
October 6, 2022
Solved

STM32F103C8T6 (Blue Pill) CAN BUS Communication

  • October 6, 2022
  • 5 replies
  • 14402 views

Hi,

I´m trying to communicate two blue pills between them using CAN bus, but when I try to run it, it doesn´t even finish the start up, because I tried to use a blink program selecting the CAN in the .ioc and not using it and doesn´t work.

Does anyone knows why does this happen?

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    The so-called Blue Pill use illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

    We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

    This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.

    Thank you for your understanding.

    Regards
    /Peter

    5 replies

    Graduate II
    October 6, 2022

    Perhaps you should use a debugger to establish what's going on?

    I​ will note the F103 can't support CAN and USB concurrently.

    Visitor II
    October 10, 2022

    Hello, thank you for your comment.

    I'm not using the USB, I have the st-link v2 programmer but I don´t use the USB.

    Technical Moderator
    October 7, 2022

    Hello @Javier Parra​ and welcome to the Community :)

    As @Community member​ said , it may be related to the use of USB and CAN with STM32F103:

    Concurrent use of USB and CAN with STM32F103

    When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

    Imen

    Technical Moderator
    October 7, 2022

    Hello,

    Does "Blue Pill" board embed CAN transceiver (I think not) ? If not, did you add this external component?

    If not, it will never work!

    Graduate
    October 9, 2022

    @SofLit,

    I think your statement is not correct: if on both side there is no tranceiver it can work for sure.

    See "Beginning STM32, by Warren Gay ISBN978-1-4842-3623-9" P317 Chapter 18 CAN-bus"

    RX and TX are connected to the same bus with a 4.7K pull up resistor.

    Best Regards,

    Johi.

    Technical Moderator
    October 10, 2022

    @Johi,

    We do NOT support this kind of "exotic" connections and we don't guarantee the behavior during the communication .. So, in normal mode, CAN bus SHOULD be used with transceivers in a complete bus configuration.

    Technical Moderator
    November 10, 2022

    I just stumbled across this thread because, like many others, it deals with the Bluepill. For a long time now, only clones and counterfeits have been used on it, which can flash an LED but do not (cannot) support many other peripheral functions. I now strongly suspect that there is also a counterfeit on your Bluepill.

    Are you 100% sure that it is an original STM32F103?

    Please check websites like e.g. hackaday.io or eevblog.com.

    Regards

    /Peter

    Technical Moderator
    April 25, 2025

    The so-called Blue Pill use illegally cloned STM32F103. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.

    We recommend to purchase genuine products from STMicroelectronics and purchase them from known and trusted distributors.

    This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.

    Thank you for your understanding.

    Regards
    /Peter