Porting of the host application
Copyright IXXAT Automation GmbH
42
IEM Manual, 1.5
3.1.2 Adaption of the memory management (GEO)
Additional to the BSP unit, the Generic Operation System (GEO) functions
have to be verified respectively adapted to your target. Most functions of the
GEO unit handle the management of dynamic memory. If your target supports
e.g. memory pools to avoid memory fragmentation, this is the right place to
implement this feature.
3.1.3 Adaption of the SPI driver
If you want to use the SPI interface it’s necessary to implement the SPI unit
according to your specific periphery. The unit SPI already implements the
needed functions for our reference design.
3.1.3.1 Data packet design
The communication between host CPU and module is handled with data
packets. Every datagram is built with the same scheme, header part are the
first five bytes. The trailer of each header contains the data itself.
Byte
0
cmd
1
LSB
2
MSB
3
LSB
4
MSB
5
data[0]
...
n
data[n-1]
address
data length
Figure 3-1: Datagram overview
Byte
Name
Description
header
0
cmd
0x01 write command
0x02 read command
other commands are ignored
1
address
low significant byte of start address
2
address
high significant byte of start address
3
data length
low significant byte of data length
4
data length
high significant byte of data length
5
data[0]
first data byte
tr
ai
ler
…
…
…
n
data[n]
last data byte
Table 3-2: Overview of data datagram packet