Quantcast
Channel: OpenEnergyMonitor aggregator
Viewing all articles
Browse latest Browse all 328

mharizanov: FOTA update without external flash for Atmega32U4 + RFM69

$
0
0

I’ve blogged before why firmware-over-the-air (FOTA) updates are a must-have nowadays, however my old AVR+RFM based projects were incapable of that due to the lack of external flash to temporary store the new firmware before it is flashed on chip. The Moteino project does have FOTA capabilities and Felix has created an excellent library for this, sure by using external SPI flash chip. David Berkeley has done similar work with I2C external chip.

I was contacted couple of days ago by Vitezslav Vlcek, who managed to do FOTA for the Atmega32U4 + RFM69 based Funky v3 without the use of external flash module. The catch is that you can use half of the available for custom applications 28K of internal flash. Quite a limitation, but impressive achievement none the less. He modified the Caterina bootloader to expose a function that wraps the SPM instruction, and makes a call from the application code to that function in order to re-flash.

Below is the available memory layout:

Start addressStop addressSizeDescription
0x00000x37FF14KB=14336BApplication code (app area)
0x38000x38012BLength of data in temp area (Length >14334 means temp area contains invalid data)
0x38020x6FFF14334BTemp area
0x70000x7FFF4KB=4096Bootloader area (bls)

Read all about it on Vitek’s Github page. Thanks to Vitek for documenting in such detail this!

 

 

Page views: 2


Viewing all articles
Browse latest Browse all 328

Trending Articles