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.
- Enable the Command system service, and set its RTOS Configuration to Combined with System Tasks.
- Reduce the Command Print Buffer Size to 1024 bytes.
- Enable the Console system service, if it is not already enabled.
- In Console, set Select Peripheral For Console Instances to UART_CONSOLE, and set its RTOS Configuration as Combined with System Tasks.
- Under Harmony Framework Configuration (MHC), expand Drivers.
- Expand the USART Driver Instance 0, and set its RTOS Configuration as Combined with System Tasks.
- 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.
- 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).
- Navigate to the MHC Pin Table in the IDE and click the corresponding pin boxes, as shown in the following image.
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.