You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,9 +124,11 @@ Once programmed, the device continuously sends the `Hello World` message, which
124
124
125
125
### View the results:
126
126
To view the output of this project, launch MPLAB Data Visualizer from the MPLAB X IDE toolbar. In Data Visualizer, select the serial COM port associated with the PIC32CM JH00 Curiosity Nano and confirm that the settings match the configured SERCOM UART parameters in the Project Configuraiton section.
The UART pins can be probed with a logic analyzer, where the output should decode as `"Hello World\r\n"` at the configured baud rate, confirming proper signal operation.
### Step 3: Add and Configure the UART Peripheral (SERCOM1)
183
189
184
190
The device includes multiple SERCOM peripherals that can be configured as UART, SPI, or I²C. On the Curiosity Nano, only SERCOM1 is internally routed to the onboard debugger’s CDC interface, so it must be used for sending UART data to a terminal over USB.
@@ -203,6 +209,7 @@ To add and configure SERCOM1:
203
209
- All other settings can remain at default for this project.
With UART and SysTick configured, the final step is to generate code. MCC creates the initialization files, peripheral drivers, and APIs for UART communication and SysTick timing, preparing the project for application development.
<!-- Describe the main source code structure, including key functions or files, and explain how the application logic works. -->
242
250
243
251
This code defines a macro for `"Hello World"`, starts the SysTick timer, and enters a loop that sends the `Hello_World` message over UART using `SERCOM1_USART_Write()`. Timing is provided by `SYSTICK_DelayMs()` to create a 500 ms delay and prevent flooding the terminal.
244
252
253
+
<br>
254
+
245
255
### MCC-Generated APIs Used
246
256
247
257
-`SYSTICK_TimerStart()` – starts the SysTick timer so delay functions are available.
@@ -270,6 +280,7 @@ int main(void)
270
280
}
271
281
```
272
282
283
+
<br>
273
284
274
285
## Conclusion
275
286
This project showed how to configure SERCOM in UART mode on a PIC32CM M0+ device using MCC Harmony. The system clock, SysTick timer, and SERCOM1 peripheral were set up to send a `"Hello World"` message every 500 ms over the Curiosity Nano’s USB CDC interface. This simple example provides a foundation for expanding into bidirectional communication or more advanced embedded applications.
0 commit comments