Firmware update for AVR or SAMD chips

Hi all,
I wanted to know if there are other supported chips for OTA host firmware update except the ESP32.
I am designing a farily simple notecarrier device and would need a relatively simple MCU on it.
Since I have a good experience with Microchip\Atmel devices (mainly in arduino, but not only) I was wondering if there’s a possibility (or a planned possibility) to implement a firmware update for those chips.
Specifically I’m looking for ATSAMD21G18A, ATMEGA64A, ATMEGA328P, ATMEGA328PB and similar.
Thanks!
Ziv

Hi @barcesat, welcome to the Blues community!

We actually have two types of OTA host DFU, Inboard and Outboard DFU.

  • Inboard DFU, resembles the ESP32 sketch you’ve come across. First, your microcontroller must capable of OTA DFU. This has nothing to do with Blues, but everything to do with whether or not the Microcontroller is capable of supporting multiple partitions. That is the capability and technique used by the ESP32 Inboard DFU example.

  • Outboard DFU is less complex. If you have a microcontroller with a ROM bootloader and you have access to the strapping pins (like the boot pin of an STM32), then the board can support Outboard DFU. STM32 and ESP32 chips are a good examples of this type of hardware.

    We have only implemented STM32 and ESP32 today (with NRF52840 support on the way). However, if your, or any, board has the necessary prerequisites, then we would love to try and support it as well.

That being said, I did a cursory look for the boards you mentioned, and unfortunately the results did not look very promising.

Best,
Zak

Thanks for the quick reply!
I think that I’ll try the STM32 then since my application requires no wireless functionality other than cellular.
I guess STM32G030K8T6 could work with the notecard, right?
8KB 64K@ 32bit 2V~3.6V, 2x USART, I2C, interrupts, etc.

I have to my todo list looking at DFU for the megaAVR 0 series (eg ATmega4809/ATmega3209)…
It’s not an easy problem, but I think there is a pathway there… It’s a new year problem though… :slight_smile:

1 Like

Hi @barcesat ,

We do expect the STM32G030K8T6 will be compatible with Outboard DFU (we have made accommodation for it), but we have not been able to test it to confirm this is a guaranteed fact.

Please try it, we believe it will work. If it does work and you remember, please write back here to let us know. We would love to add it as a confirmed target.

Cheers,
Zak

I’ll try it and report back, thanks Zak

1 Like

Hi @zfields , How are you?
I have tried the STM32G030K8T6 using a Nucleo dev board and I managed to interact with the Notecard succesfully (Notecard Arduino Library through I2C over STM32Duino).
However, as described here: DFU OTA STM32G fails I can’t get the Outboard DFU to work. the notecard does manage to send a reset signal but the BOOT pin toggle doesn’t seem to occur and the MCU just loads up the same program again (like a normal reset would do).
Could you help me figure it out please?
Thanks,
Ziv

Interesting, it sounds like you’re on the right path.

Are you able to post a picture of how you’ve gotten access to the BOOT0 pin and how the board is wired? Also, do you have a logic analyzer, so we can see what’s happening on the on the pins?

This is an interesting problem, and we are excited to figure it out with you.

Cheers,
Zak

Hey @zfields ,
I am also interested in OTA DFU for some currently unsupported chips. I have a product line already based on the XMEGA micro that has a fuse locked bootloader section on the chip that I use currently for firmware updates. Currently these products are mainly updated locally using the bootloader or sparingly over ethernet and I would really like to give all my customers a better option of OTA as sometimes the unit is 5hrs away or they simply have a ton of units in the field. The bootloader is simular to this AVR-Xboot. I am also in the process of designing a new product that is based on the ARM Cortex-M4 by Microchip that has 8k of ROM with embedded bootloader routines (UART) and IAP routines. Do you see a roadmap for DFU on other chips using any specific bootloader base like AVR-Xboot or a standard compatible protocol like AVR109? Based on my experience if you based compatibility on AVR109 you could cover a lot of chip variants.

Thanks,
Evan

Hi @newrev426! Thanks for joining here on the forum.

You didn’t specify whether you are attempting to perform inboard (IAP) or outboard (ISP) DFU.

For the next 6 months, the Notecard Outboard Firmware Update road map does not have new MCUs other than those that are currently supported.

As for the inboard DFU (IAP), we do not have a formal roadmap, but more typically we prioritize our work based upon customer requests.

I love discovering standards like AVR109, so thank you for bring it to our attention. These standards help us to focus our efforts and serve many of our customers at once.

We truly appreciate your suggestion! I’ve added an item to the backlog for the teams to consider as we continue improve and expand both inboard and outboard DFU.

Hi @zfields,
I just wanted to update that I’ve been successfully able to perform OTA update for the STM32G030K8T6. Thanks for the help!

1 Like

@barcesat That’s wonderful news!

If you uncovered any tips and tricks, be sure to share them here for others that follow along behind you. It looks like you covered a fair bit of that on a separate post (linked).

Great job!
Zak