# DFU OTA STM32G fails

**URL:** https://discuss.blues.com/t/dfu-ota-stm32g-fails/1213
**Category:** Firmware
**Created:** [January 28, 2023, 10:45pm UTC](https://discuss.blues.com/t/dfu-ota-stm32g-fails/1213 "2023-01-28T22:45:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![barcesat](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@barcesat](https://discuss.blues.com/u/barcesat)
#### Post date: [January 28, 2023, 10:45pm UTC](https://discuss.blues.com/t/dfu-ota-stm32g-fails/1213/1 "2023-01-28T22:45:14Z")

</div>

Hi,  
In my last trial to match a simple MCU with the Notecard I tried to integrate the STM32G031K8T6U microcontroller (Arm® Cortex®-M0+ at 64 MHz in LQFP32 package, featuring  
64 Kbytes of Flash memory and 8 Kbytes of SRAM)  
I got the [STM32G0 Nucleo-32 board (MB1455)](https://www.st.com/resource/en/user_manual/dm00622380-stm32g0-nucleo-32-board-mb1455-stmicroelectronics.pdf) as a prototype board and managed to write a basic sketch using [platform.io](http://platform.io) to interact succesfully with the Notecard using a Notecarrier-F.  
These are the connections I use:  
|Notecard|MCU|  
|N\_SCL|D8 - PB-8|  
|N\_SDA|D10 - PB-9|  
|ATTN|A0 - PA-0|  
|GND|GND|

Notecard runs from USB, NUCLEO board runs from 5V supply.

Next, I wanted to use the STM32 DFU capability.  
I wen’t through the Notecard Outboard Firmware Update guide and wired these other wires:  
|Notecard|MCU|  
|AUX3|B0 - PA-14 (SB5 Jumper disconnected)|- This is originally connected to the onboard STLINK  
|AUX4|RST - RESET (T\_NRST)|  
|AUXRX|TX - PA-2 (SB3 Jumper disconnected)| - This is originally connected to the onboard STLINK  
|AUXTX|RX - PA-3 (SB4 Jumper disconnected)|- This is originally connected to the onboard STLINK  
([See schematic](https://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group1/05/c3/27/2a/6b/db/41/f1/MB1455-G031K8-C01_Schematic/files/MB1455-G031K8-C01_Schematic.pdf/jcr:content/translations/en.MB1455-G031K8-C01_Schematic.pdf))

I managed to wrap up an bin pack file per instructions, uploaded to notehub, initiated DFU update and I track in the webserial console on the Notecard.  
It downloaded the bin file but I got that error:

```auto
S04:59.03 dfu: performing stm32 direct DFU
S05:04.71 loader: connect error can't connect to stm32
S05:10.38 loader: connect error can't connect to stm32
S05:16.03 loader: connect error can't connect to stm32
S05:21.69 loader: connect error can't connect to stm32
S05:27.35 loader: connect error can't connect to stm32
S05:33.02 loader: connect error can't connect to stm32
S05:38.70 loader: connect error can't connect to stm32
S05:44.37 loader: connect error can't connect to stm32
S05:50.04 loader: connect error can't connect to stm32
S05:55.71 loader: connect error can't connect to stm32
S05:55.71 loader: connect 10 retries

```

Am I doing something wrong? I triple checked all of my connections…  
Thanks!  
Ziv

---

<div class="post-metadata">

### Author: ![barcesat](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@barcesat](https://discuss.blues.com/u/barcesat)
#### Post date: [February 27, 2023, 8:28pm UTC](https://discuss.blues.com/t/dfu-ota-stm32g-fails/1213/2 "2023-02-27T20:28:09Z")

</div>

For anyone that’s wondering,  
I just wanted to update that I’ve been successfully able to perform OTA update for the STM32G030K8T6 MCU using the notecard.  
I realized that it’s too tought to get access to the BOOT0 pin on the Nucleo board, so I designed and built a board that holds this MCU with just the bare essantials (I can send you the design if you’d like that).  
After using an FTDI adapter & hooking the BOOT0 pin to 3.3V I was able to upload a basic firmware to it. Then, I hooked it up to the notecard, tracked that it’s negotiating with it and got it to interact with notehub I made an OTA binpack file per the guide instructions, made sure that the pins AUX\_TX, AUX\_RX, AUX\_3, AUX\_4 are connected to the MCU, I hit the Host firmware update and it worked like a charm 🙂  
Thanks for the guides, awesome product and the great webinar the Blues team hosted about it!
