Skip to main content
Explorer
July 30, 2025
Solved

STM32 MCU to use CAN and USB simultaneously

  • July 30, 2025
  • 2 replies
  • 694 views

Hi there 
Is there any stm32 MCU versions that has can run both CAN and USB simultaneously without conflicting with the PB8 boot pin? Also the USB will only be recognized if the PB8 pin is pulled high can i just directly connect it to 3.3v and always keep it on. will that be a problem 

    This topic has been closed for replies.
    Best answer by Karl Yamashita

    STM32F105xx, STM32F072 and many more depending on any other requirements. 

     

    You can't keep the boot pin tied high else it'll stay in boot mode.

     

    2 replies

    Graduate II
    July 30, 2025

    STM32F105xx, STM32F072 and many more depending on any other requirements. 

     

    You can't keep the boot pin tied high else it'll stay in boot mode.

     

    Explorer
    July 30, 2025

    In order to enter the USB the PB8 pins needs to be pulled high. But I can't do it externally is there a way I can pull the pin high just so it enters USB bootloader.

    Also i need a smaller package size the ones you mentioned are really big

    Graduate II
    July 30, 2025

    As far as I can remember, but I could be wrong, 48 pin packages is about the smallest you can go to be able to use both USB and CAN at the same time without any conflicts with shared resources. STM32F042 is another that I use.

    The F105 has dual CAN controllers. You didn't give enough info so i threw that out there. 

    Explorer
    July 30, 2025

    Yeah sorry my bad 48 pin package is good. Thank you @Karl Yamashita . 
    I just need to figure one more thing out. How can i enter into USB mode without any external work like pulling the PB8 pin  high using a button. i need it to be just pluggable and i should enter into USB mode . I just need data transmission via USB.

    Graduate II
    July 30, 2025

    You'll need the software application to send a command to the application FW which will then jump to the built in bootloader. But that's not a good idea as you can brick the device if the FW fails to update, unless you can get to the boot pin.

    A better approach is to make a custom bootloader. So even if the application fails to update, you still have the custom bootloader that will still stay in bootloader mode until there is a validate application code in the device.