Here is how to enable UART4 on WICED SDK to receive set number of data within given timeout after requesting it from the simulated device.

Device is simulated using Tera Term macro script, uart_data_exchange.ttl.

 

Below is the sequence of data exchange:

- Data is requested on the UART4 interface by sending 0x0A ('\n') to the Tera Term terminal.

- A macro running on the Tera Term waits for the requesting data then sends a response to the Wiced device.

- The Wiced device receives the data on the UART4 interface with a given timeout.

- Data received on the UART4 is relayed to the STDIO_UART (USART6) for logging.

- The continuous receive and transmission of data could be interrupted on the Wiced debug interface STDIO_UART (USART6) by typing 'x'. If not the sequence repeats with a timeout of 4 seconds.

 

Both UART4 Rx and Tx pins are routed to the "Breakout Header" on the evaluation platforms.

 

To connect the UART4 on the BCM943341WCD1 use the following connections:

     UART4-Tx -> J7-20

     UART4-Rx -> J7-8

 

To connect the UART4 on the BCM943362WCD4 use the following connections:

     UART4-Tx -> J7-9

     UART4-Rx -> J7-6

 

For more information on Uart connections please check Enable UART4 on BCM943362WCD4 and BCM943341WCD1 as Terminal Output blog post.

 

Hardware setup:

 

- Connect UART4 on the Wiced device to PC and open a Tera Term for the connection.

- Connect a PC terminal to the serial port of the WICED Evaluation board and open a second Tera Term terminal for the debug interface.

- Copy attached uart_data_exchange snippet application to .../apps/snip directory of the Wiced SDK or apply the attached patch file.

    

- Start the uart_data_exchange.ttl macro on the Tera Term connected to the Wiced UART4.

 

Build, download and run the uart_data_exchange snippet application:

    

     snip.uart_data_exchange-BCM943341WCD1 download run

     or

     snip.uart_data_exchange-BCM943362WCD4 download run

   

Here is outputs on the Tera Term terminals for both UART4 and STDIO_UART: