Skip to main content
dshekter1
Associate II
Oct 4, 2019 8:50 PM UTC
Solved

stm32g431 CAN bus and USB dfu

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.
bgate.1
bgate.1Best answer
Visitor II
Jul 15, 2022 6:17 AM UTC

you can config nSWBOO0 in option byte to bypass PB8 pin

2 replies

bgate.1
bgate.1Best answer
Visitor II
Jul 15, 2022 6:17 AM UTC

you can config nSWBOO0 in option byte to bypass PB8 pin

dshekter1
dshekter1Author
Associate II
Jul 15, 2022 10:19 PM UTC

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.