Revision: 1.18
CrossFire IX – Freely Programmable - Data Logger Edition -
Programming Manual
2018-12-21
17
16.4.
The FOTA (Firmware Over The Air) example
The FOTA example shows how to perform firmware upgrade using Wi-Fi.
For security reasons, the FOTA firmware checks that the digital in 1 is high (port 9), otherwise the
Wi-Fi chip will not be activated.
The example sets up the Wi-Fi module as an access point and sets up a TCP server on the module.
The firmware file received is sent over the USART to the IX main processor and is stored in the
external SPI FLASH memory. After reboot the bootloader will read from the SPI flash memory and
perform the actual firmware upgrade.
FOTA uses the first 1.5MB of SPI FLASH memory to temporarily store the firmware file. If the SPI
FLASH memory is used for other things as well, you must reserve the first 1.5MB if FOTA is going
to be used.
When starting the example the CrossFire IX will set up an access point with name
CrossFireIX_001. Use password “password001” to connect. The CrossFire IX will use IP address
192.168.4.1 and will give the first connected unit IP address 192.168.4.2.
The firmware package (*.fwp) is created with the CrossFire IX DLE Tool. This tool is only available
as a binary.
To download the firmware package, the tool CrossFire IX Wi-Fi Tool is used. It connects to the TCP
server and transfers the firmware package. This tool is supplied with full source code and can be
adapted by the OEM. The tool is written in C#/WPF in Visual Studio 2010.
For performance reasons, the USE_OUTPUTS and USE_PWMI define are NOT set which means
that output I/O is not available.
The FOTA code is implemented in the file fota.c.
17.
References
CrossFire IX - Technical manual.docx
CrossFire IX - CANopen Slave Developers Guide.docx