Skip to main content
UUrcan
Associate II
June 29, 2020
Question

STM32f103C8 USB and CAN using together (Unrecognised USB problem)

  • June 29, 2020
  • 2 replies
  • 2126 views

I can not use CANBUS and USB together. I configurated USB and CAN together but PC does not recognise the STM32F103C8 as an USB driver.

When I use only USB without CAN configuration then USB work properly and recognise it as an USB driver.

When I add CAN configuration from different pins (PB8 and PB9) then CANBUS works on these pins but USB not.

How can I recognise the STM32F103C8 as an USB drive to my PC with using CANBUS together? Could you help me about this please?

This topic has been closed for replies.

2 replies

Amel NASRI
ST Technical Moderator
June 29, 2020

Hi @UUrcan​ ,

Unfortunately, you cannot use USB & CAN at the same time for the selected device. To know more about this and the why reason, please refer to this article: https://community.st.com/s/article/FAQ-Concurrent-use-of-USB-and-CAN-with-STM32F103.

Don't forget to answer the question "Was this article helpful?" from article page.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
UUrcan
UUrcanAuthor
Associate II
June 29, 2020

OK Amel. Thanks for your reply.

But which devices can use both of them (USB and CAN) together at the same time?

Amel NASRI
ST Technical Moderator
June 30, 2020

hi @UUrcan​ ,

This is applicable for low, medium-, high- and XL-density STM32F1 devices as precised in the article.

So you can select any other STM32F1 device or a device belonging to other families.

As explained in RM0008:

  • Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
  • Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
  • High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes.
  • XL-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 768 Kbytes and 1 Mbyte.
  • Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.