nauart: FIM UART Driver Example Application

Supported platforms
===================
This test can run on the ConnectCore 9P 9215, ConnectCore Wi-9P 9215,
Digi Connect ME 9210 development boards.

Running this sample application requires external hardware to interconnect to 
your Digi JumpStart Kit Development board.  This readme provides instructions 
based on the Digi FIM Application Kit (Digi P/N DG-ACC-FIM).

Please note it is not mandatory to use the FIM Application kit to successfully 
run this application; prototype hardware can be built up in its place.  
However, the FIM Application Kit provides a standard reference design platform 
with all the hardware components and accessory items necessary for immediate 
prototyping of NET+OS applications with FIM-based I/O capabilities.

Complete documentation and schematics for the FIM Application Kit are available 
in the "Application Kit" section on the Digi technical support website 
at www.digi.com/support.

Please also visit the www.digiembedded.com  for additional information and purchase options.


Connecting and configuring your FIM Application Kit board
-----------------------------------------------------------------------

The application requires FIM0 to be configured as /com/4 and connected to 
the UART_0 section of the FIM Application board.  

Please refer to the FIM Application Kit Quick Start Guide and the Hardware Reference
Manual (HRM) for guidance on how connect and configure your FIM Application Kit board.

What it does
-------------
a) The application can perform a loopback test on a single serial 
   port if the port is wired for loopback as follows:
   
PORT1TX -->--|
             |
PORT1RX --<--|

PORT1RTS -->--|
              |
PORT1CTS --<--|


b) The application can perform a loopback test between two serial
   ports if they are connected to each other as follows:
   
PORT1TX -->-- PORT2RX -->--|
                           |
PORT1RX --<-- PORT2TX --<--|

PORT1RTS -->-- PORT2CTS -->--|
                             |
PORT1CTS --<-- PORT2RTS --<--|

c) The test can be configured for different baud rates and flow control
   options.

d) You can edit the test to have it check parity and stop bits.

e) 200K of data is transfered for the test.

f) An error message is printed if data corruption is detected, or if
   there is some other error transmitting or receiving.

g) The test repeats indefinitely

h) Test also starts FTP server to allow the firmware in flash to be 
   updated.


Procedure
---------


Connectcore9p9215_a Jump Start Kit
----------------------------------
This application uses 4-lines UART configuration.

1. Application uses FIM0 UART Port RS232_0 "com/4" as test PORT1 and "com/1" as test PORT2

2. In gpio.h make sure 
   BSP_GPIO_MUX_IOP_0_GEN_IO_0 is set to BSP_GPIO_MUX_USE_2ND_ALTERNATE_PATH
   BSP_GPIO_MUX_IOP_0_GEN_IO_1 is set to BSP_GPIO_MUX_USE_2ND_ALTERNATE_PATH
   BSP_GPIO_MUX_IOP_0_GEN_IO_2 is set to BSP_GPIO_MUX_USE_2ND_ALTERNATE_PATH
   BSP_GPIO_MUX_IOP_0_GEN_IO_3 is set to BSP_GPIO_MUX_USE_2ND_ALTERNATE_PATH

   These will configured the GPIO Pins for FIM0 UART.

3. In bsp_iop.h, make sure 
    BSP_IOP_FIM0_UART_TXD is set to BSP_IOP_GEN_IO_0
    BSP_IOP_FIM0_UART_RXD is set to BSP_IOP_GEN_IO_1
    BSP_IOP_FIM0_UART_RTS is set to BSP_IOP_GEN_IO_2
    BSP_IOP_FIM0_UART_CTS is set to BSP_IOP_GEN_IO_3


Connectme9210 development board
-------------------------------
This application only uses 2-lines UART configuration.

1. Application uses FIM0 UART Port RS232_0 "com/4" as test PORT1 and "com/0" as test PORT2

2. Make sure use "/com/2" for dialog and stdio output.
   In bsp_sys.h configure dialog and stdio to use "com/2" by setting
   BSP_STDIO_PORT to "/com/2" and 
   BSP_DIALOG_PORT to "/com/2"

3. In gpio.h make sure 
   BSP_GPIO_MUX_SERIAL_A is set to BSP_GPIO_MUX_SERIAL_2_WIRE_UART
   BSP_GPIO_MUX_IOP_0_GEN_IO_1 is set to BSP_GPIO_MUX_USE_PRIMARY_PATH
   BSP_GPIO_MUX_IOP_0_GEN_IO_2 is set to BSP_GPIO_MUX_USE_PRIMARY_PATH

   These will configured the GPIO Pins for FIM0 UART.

4. Make sure the IO2 and IO3 are selected on SW3 switch on the Digi Connect ME 9210 development board.

5. Make sure P5 jumper on the Connectme9210 development board is set to enable RS232.



   


