4 Replies Latest reply on Aug 13, 2015 4:42 PM by mkochhal

    BCM943341 and WICED SDK 3.3.1 -- repurposing snip.uart to use UART2

    mkochhal

      The snip.uart in the WICED SDK 3.3.1 uses STDIO_UART to echo bytes sent over the terminal connected to that COM port.

       

      I want to repurpose that application to use pins 9 and 10 on the breakout header. These stand for UART2 RX and TX respectively.

       

      I want to know how can I pass the UART2 number in the wicked_uart_init()? As of now, the SDK has platform.h for BCM943341WCD1 has the following definition for UART

       

      typedef enum

      {

          WICED_UART_1,

          WICED_UART_MAX, /* Denotes the total number of UART port aliases. Not a valid UART alias */

          WICED_UART_32BIT = 0x7FFFFFFF,

      } wiced_uart_t;

       

      /* UART port used for standard I/O */

      #define STDIO_UART                       ( WICED_UART_1 )

       

      Can I use WICED_UART_2 and hope that this will result in TX/RX on the respective pins 9 and 10. Is there anything else I need to configure besides adding WICED_UART2=2 in the wiced_uart_t structure and passing it to the init function below?

       

          /* Initialise UART. A ring buffer is used to hold received characters */

          wiced_uart_init( STDIO_UART, &uart_config, &rx_buffer );