cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f103C8 USB and CAN using together (Unrecognised USB problem)

UUrcan
Associate II

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?

3 REPLIES 3
Amel NASRI
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

UUrcan
Associate II

OK Amel. Thanks for your reply.

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

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 Accept as Solution on the reply which solved your issue or answered your question.