3.7 Configuring Console I/O

For any embedded project, it is important to print messages on the console. For this, use the Harmony Console and Command system service to send messages to the host computer using the UART module. The Explorer 16 Board features a UART communication interface.

  1. Enable the Command system service, and set its RTOS Configuration to Combined with System Tasks.
  2. Reduce the Command Print Buffer Size to 1024 bytes.
  3. Enable the Console system service, if it is not already enabled.
  4. In Console, set Select Peripheral For Console Instances to UART_CONSOLE, and set its RTOS Configuration as Combined with System Tasks.
    Figure 3-14. UART Communication Interface
Configure the corresponding UART driver to drive with the console service as described in the following steps.
  1. Under Harmony Framework Configuration (MHC), expand Drivers.
  2. Expand the USART Driver Instance 0, and set its RTOS Configuration as Combined with System Tasks.
  3. Change the USART Module ID to USART_ID_2 because the Explorer 16 Board User’s Guide indicates that the UART2 is connected to the UART interface.
  4. Assign the TX/RX pins for the UART2 module based on the reference hardware design; the U2RX is pin-49 (RF4) and the U2TX is pin-50 (RF5).
  5. Navigate to the MHC Pin Table in the IDE and click the corresponding pin boxes, as shown in the following image.
    Figure 3-15. USART Driver Instance and MCH Pin Table

During the interaction of the ATWINC15x0 solution with the PIC32 devices, the user needs to mainly focus on Pin mapping using MHC. The harmony framework takes care of the driver code for the modules.

Harmony supports multiple reference applications for demonstrating the ATWINC15x0 driver. The user can choose the reference application based on their need.