Rapid Prototyping with 32-bit MCU-based Curiosity Nano Evaluation Kit Using MPLAB Harmony v3 Software Framework: Step 4

Step 4.1: Configure Universal Synchronous Asynchronous Receiver Transmitter (USART) Peripheral Library and USART Pins

1

Under the Available Components tab, expand Peripherals > SERCOM.

Double-click on SERCOM3 to add the SERCOM instance 3 to the project.

sercom_selection_for_uart.png
Figure 1

2

Select the SERCOM3 Peripheral Library in the Project Graph, verify that the default SERCOM Operation Mode configuration is set as USART, and configure it.

uart_sercom_setup.png
Figure 2

3

Select the Pin Table tab and then scroll down to the SERCOM3 module as follows.

  • Enable USART_TX (SERCOM3_PAD2) on PA24 (Pin #23)
  • Enable USART_RX (SERCOM3_PAD3) on PA25 (Pin #24)
uart_sercom_pins_setup.png
Figure 3

The BM71 XPRO needs two additional pins, one to reset the BLE module and the other to serve as the BM71 RX Indicator.

Configure these PORT pins needed by the BM71 XPRO in the MHC Pin Configurator as follows.

  • Set the Custom Name as "BM71_RX_IND" on PA28 (Pin #27), Direction as Out, and Latch as High.
  • Set the Custom Name as "STBYRST" on PA04 (Pin #04), Direction as Out, and Latch as High.
uart_sercom_pins_setup1.png
Figure 4

4

Under the Available Components tab, expand Tools, and add the STDIO component to the Project Graph. The BM71 driver has a dependency on the STDIO Library to print the logs.

Note: Here you are not connecting a UART (SERCOM), due to a shortage of pins on the PIC32CM MC00 Curiosity Nano Evaluation Kit.

stdio.png
Figure 5

Step 4.2: Associate BM71 Driver

Associate the BM71 driver with the SERCOM instance 3 (USART) peripheral by right-clicking on the yellow diamond.

bm71_selection.png
Figure 6
bm71_linked.png
Figure 7

Step 4.3: Configure Timer and Harmony Core Services

1

Under the Available Components tab, expand Harmony > System Services.

Double-click on TIME to add the timer system instance to the project.

timer.png
Figure 8

Note:
1. While adding Timer system service, MHC will pop a message for activating a core service, Click Yes.
2. For FreeRTOS, Click No.

2

Associate the TIME System Service with the timer instance 0 (TC0) peripheral by right-clicking on the red diamond.

timer_associate.png
Figure 9

3

Click on Harmony Core Service and configure as shown in Figure 10.

core_configuration.png
Figure 10

Note: This completes the configuration of UART, BM71 driver, Timer, and Harmony Core Service to interact with the BM71 Bluetooth module for wireless connectivity.


Next Step >

© 2022 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.