Skip to main content
Visitor II
October 4, 2019
Solved

stm32g431 CAN bus and USB dfu

  • October 4, 2019
  • 1 reply
  • 2951 views

I would like, if possible to use the 64 pin package in my design. The problem is that I need a CAN bus and would like to program the chip straight from USB (with potentially needed level shifting?) with the DFU I've heard so much about. I can move CAN_RX to PB8 which is the boot0 pin, but how would that work? Would I need to jumper between the hardware for setting boot0 and the can_rx line from the transceiver? Or do I need to move up to the 80 pin package where CAN_RX /TX have PD0/1 almost entirely to themselves? I guess I'm mostly confused on how the boot0 pin works, it seems to have a lot of alternative uses that hinder its use as a boot selector pin. Like, if there's data coming into the CAN_RX and the MCU turns on at that time and sees a logic high will it think "better go load the program over USB"?

    This topic has been closed for replies.
    Best answer by bgate.1

    you can config nSWBOO0 in option byte to bypass PB8 pin

    1 reply

    bgate.1Answer
    Visitor II
    July 15, 2022

    you can config nSWBOO0 in option byte to bypass PB8 pin

    dshekter1Author
    Visitor II
    July 15, 2022

    admittedly this project is long gone, but I do think that would work. By using another pin instead of boot0, the SYSCFG->MEM_MODE register, and the code outlined here, Tutorial - Jump to system memory from software on STM32 - STM32F4 Discovery (stm32f4-discovery.net), I think it would work. Certainly learned a lot about microcontrollers in the past 3 years.