cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1RETx DFU design questions, BOOT0

MStev.7
Associate II

Setup: I am designing on the Nucleo-G0B1RE

Goal: DFU via USB FW updates

Although the Nucleo Expansion provides a USB ST-Link interface I do not want to utilize this interface as I want to go directly to the MCU to emulate our board.

For code uploads and debugging I am currently wired directly to the MCU via a SWD link (GND, NRTS, SWDIO, SWCLK) via a ST-Link V2.

The SWD link to the MCU will be the method that our board is programmed initial in the factory, DFU via USB is how we will provide FW updates for the board is in the field.

CUbeMX I have configured the device to USB_DRD_FS Mode = Device_Only (FS) as well as set the USB_Device Mode Class for FS IP = Download Firmware Update Class

I have configured PA12 as USB_DP and PA11 as USB_DM, CN10 Pin 12 and CN10 Pin 14 respectively on the Nucleo.

I will be connecting a USB Micro-B breakout board to PA12 USB_DP to D+ on breakout and USB_DM to D- again on breakout as well as PWR and GND.

So I have a few questions....

  1. Once I make the USB connections should I expect to see a USB connection to a PC host with BOOT0 tied to 3.3V?
  2. I understand that I need to configure/create a Bootloader for the DFU functionality to work, is there a good reference and code examples that I should be looking at? I have seen some code in Github, however I hoping that ST might have some examples. I have looked at AN2606.
  3. In order to enter the DFU mode, based on what I have been able to find/read it appears that the bootloader will only enter the DFU method if BOOT0 is high, we would like to have a design that allows for us to enter DFU without an pin changes, jumpers added, HW interaction if at all possible?

1 REPLY 1

I don't have these devices..

3) You'll probably need to remap the ROM at the zero memory address, check DBGMCU or SYSCFG settings to do the remap. Then try doing a transfer of control to the ROM entry point via the vector table.entry. See if it works

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..