cancel
Showing results for 
Search instead for 
Did you mean: 

stm32g431 CAN bus and USB dfu

dshekter1
Associate II

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"?

1 ACCEPTED SOLUTION

Accepted Solutions
bgate.1
Associate II

you can config nSWBOO0 in option byte to bypass PB8 pin

View solution in original post

2 REPLIES 2
bgate.1
Associate II

you can config nSWBOO0 in option byte to bypass PB8 pin

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.