01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Top of list<br />

Index page<br />

3. Since <strong>@CHIP</strong>-<strong>RTOS</strong> 1.02B XON/XOFF mode is available also with the serial DMA receive mode<br />

in use.<br />

Please note: Because of the internal functionality of DMA it is not possible to immediately detect<br />

an XON or XOFF character from the connected peer. It is possible that an overrun situation at<br />

the peer (e.g. GSM modem) can occur. Nevertheless we enable this mode because some GSM<br />

modems (any??) support only XON/XOFF as serial flow control mechanism.<br />

4. The default serial receiver queue size is 1024 bytes. If the default DMA receive mode is used, it<br />

is advised to increase the receiver queue size in Chip.ini up to a minimum value of 2048 bytes to<br />

prevent a possible buffer overrun (even if hard handshake is used). This can only happen with<br />

the default queue size of 1024 bytes if the user doesn't call the Fossil API read block function<br />

frequently enough. If the application programmer does not increase this buffer size up to the<br />

recommended value, they should call the Fossil API read block function with sufficient buffer<br />

size in the CX-Register to flush the internal buffers and prevent a receive buffer overrun.<br />

5. Serial ports, running with IRQ receive mode:<br />

The two serial ports of the <strong>IPC<strong>@CHIP</strong></strong> have no hardware FIFO buffer. Only one incoming<br />

character can be stored direct by the ports. As a consequence of this behaviour, it is possible<br />

that incoming characters get lost because of missed or delayed receiver interrupt execution (see<br />

Operating mode of serial ports). E.g.: Writing a flash sector (e.g. happens when writing a file<br />

at Drive A:) disables all interrupt execution for about 15 ms. If the serial port is configured with a<br />

baud rate of 9600, incoming characters can be lost during this time.<br />

Loss or delayed execution of serial receiver interrupts depends on the number and the execution<br />

frequency of all enabled interrupts in the <strong>IPC<strong>@CHIP</strong></strong> system. It depends also on execution times<br />

of users interrupt service functions and the duration of interrupt masking periods (CLI / STI<br />

instruction sequences).<br />

6. For a given serial port the fossil functions are not reentrant. Do not call fossil functions for the<br />

same serial port from different tasks. However for different serial ports, the fossil functions are<br />

reentrant. E.g. task A can operate the COM port using fossil functions concurrently with task B<br />

operating the EXT port using the same fossil functions.<br />

Fossil API<br />

Working with Float Data Types<br />

1. The <strong>IPC<strong>@CHIP</strong></strong> does not provide a floating point co-processor. So if you want to use floating<br />

point data types you need to enable the math-emulation in your compiler. In Borland C++ 5.02<br />

see the option "Emulation" under the Target Expert's (right mouse click on your Exe-file in your<br />

project) "Math Support".<br />

2. The Borland Math Emulation libraries are not made for usage in a multitasking system like the<br />

<strong>@CHIP</strong>-<strong>RTOS</strong>. If you want to use float data types in tasks other than your main (DOS) task,<br />

please pay attention to the following work around solution (Using Borland 5.02, Memory model<br />

large):<br />

a) For floating point emulator usage, the current stack (the stack of the task) must have offset 0.<br />

To achieve this, the task stack must be far array located in a separate segment:<br />

unsigned int far task_stack[TASK_STACKSIZE];<br />

Note: The CGI callbacks execute on the Web server's stack, which satisifies this "offset 0<br />

present" requirement.<br />

Page 13 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!