background image

 

Revision: 1.18 

CrossFire IX – Freely Programmable - Data Logger Edition - 
Programming Manual 

2018-12-21 

 

 

 

 

12

 

address, BOOL async); 

158Kb/s. This will take about 400ms. 

unsigned char 
EXTFLASH_ChipErase(BOOL async); 

Erase the whole FLASH chip 

unsigned char 
EXTFLASH_Write(unsigned long 
address, unsigned char *data, int 
len, BOOL async); 

Write to the FLASH memory. Note that the FLASH block 
must be erased before write. 

unsigned char 
EXTFLASH_Read(unsigned long 
address, unsigned char *buffer, int 
len); 

Read from the FLASH memory 

BOOL EXTFLASH_ReadID(unsigned char 
*manufactId, unsigned char 
*deviceId); 

Read the device and manufacturer ID from the External 
FLASH. Should be manufacturer = 1 and deviceId = 15 for 
standard SPI FLASH in CrossFire IX. 

15.3.

 

The Wi-Fi module 

CrossFire IX data logger edition contains a Wi-Fi module (ESP-WROOM-02) connected to the 
main processor through an UART. The Wi-Fi module contains a microcontroller with full TCP/IP 
stack and can handle both TCP and UDP. The module is freely programmable and can do a number 
of things, for example: 

 

Send data to an IoT cloud service like ThingSpeak. 

 

Set up a local webserver that can be used for administering or supervising the CrossFire IX. 

 

Fetch data from internal or external web servers, for instance backups of machine 
configurations. 

 

Send and receive UDP and TCP data in any form. 

 

It is also possible to use the Wi-Fi module microcontroller as a generic slave processor, not 
using the Wi-Fi functionality at all. 

The Wi-Fi module can be programmed in several different ways: 

 

Using the Espressif SDK 

 

Using NodeMCU/LUA 

 

Using Arduino core for ESP8266 

CrossControl recommends the Arduino core for ESP8266. All CrossControl examples are based on 
Arduino core for ESP8266. 

The Wi-Fi module is connected to the main processor through an UART. The UART has a 
communication speed of max 500kbit/s. This means that a transfer rate of about 40-50KB/s can be 
reached between the IX main processor and the slave processor. 

The Wi-Fi module can run in either 80 or 160 MHz. It is recommended to use 80 MHz for 
maximum stability and lower power consumption. 

There are a number of different examples available in the examples chapter. There are also a lot of 
generic examples for ESP8266 on the Internet. 

The most common functions for the WIFI module are: 

Summary of Contents for CrossFire IX

Page 1: ...Revision 1 18 CrossFire IX Freely Programmable Data Logger Edition Programming Manual 2018 12 21 www crosscontrol com CrossFire IX Freely Programmable Data Logger Edition Programming Manual...

Page 2: ...ossFire IX Data Logger API 7 11 Interrupts 7 12 Hardware resources 8 13 Testing 8 14 Tools 8 14 1 Upgrading the firmware of the CrossFire IX over Wi Fi 8 15 Functionality of the Data Logger Edition 10...

Page 3: ...1 6 Added info about the examples CMM 2018 11 07 1 7 Minor changes regarding the Wi Fi module CMM 2018 11 09 1 8 Updated examples chapter CMM 2018 11 20 1 9 Name change to Programming Manual CMM 2018...

Page 4: ...machine is used during special supervision Especially if the firmware written allows messages coming over Wi Fi to control outputs or to send CAN messages However note that even if outputs or CAN is...

Page 5: ...ed Workbench For programming the Wi Fi slave processor several development environments are available The development environment recommended by CrossControl is the Arduino IDE The Arduino IDE can be...

Page 6: ...ed in the Boards Manager In the menu under Tools Board make sure to select the NodeMCU 0 9 this is not exactly right but close enough To create a binary for CrossFire IX select Sketch Export compiled...

Page 7: ...sion of the CrossFire IX Tool supporting upgrade of the Wi Fi processor The tool is available in the Tools CrossFire IX Tool DLE folder 9 Libraries To make it possible to use the data logger functions...

Page 8: ...ST the function PerformUnitTest will be executed after system init In this function a number of test functions are called The test functions will use printf to give user feedback so it is important th...

Page 9: ...Fi processor NodeMCU For the Wi Fi processor file you need to supply your own version number For the other binaries the version number is read from the binary file itself When all files are selected...

Page 10: ...optional Erase the SPI FLASH used by FOTA the first 1 5MB by clicking Erase FLASH This will erase any information that is stored there already Browse for the fwp file by pressing the button Click Down...

Page 11: ...possible to erase the complete FLASH at once Please note that writing to and erasing the external FLASH memory is a relatively slow operation Writing to the FLASH memory requires the memory to be eras...

Page 12: ...d data to an IoT cloud service like ThingSpeak Set up a local webserver that can be used for administering or supervising the CrossFire IX Fetch data from internal or external web servers for instance...

Page 13: ...should not be freed with WIFI_FreeLastMessage afterwards void WIFI_FreeLastMessage void Free the last message in the message queue Must be called after you have processed data returned by WIFI_GetMes...

Page 14: ...hat IP address and port is correct To perform a firmware upgrade over CAN digital in 1 must be connected to VBAT at start up This will active 1000 kbit s CAN bit rate and the unit will accept firmware...

Page 15: ...commercial use ThingSpeak is integrated with MATLAB making it possible to perform advanced data analysis The ThingSpeak example shows how to send data to the ThingSpeak IoT server The example sets up...

Page 16: ...message in the memory but takes more FLASH memory for small messages Besides from the actual message data and id also a 32 bit counter a 32 bit millisecond timer and a checksum is stored for each mess...

Page 17: ...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 passw...

Page 18: ...gramming Manual 2018 12 21 18 https support crosscontrol com https atollic com https www arduino cc en Main Software https www espressif com en products hardware esp wroom 02 overview https thingspeak...

Page 19: ...in this handbook is supplied without any guarantees and can change without prior notification For CrossControl licensed software CrossControl grants you a license to under CrossControl intellectual p...

Reviews: