Skip to content

Commit 8b8a383

Browse files
author
Ethan Layton
committed
MPAE-20216: Readme update
1 parent 10ecf94 commit 8b8a383

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ Once programmed, the device continuously sends the `Hello World` message, which
124124

125125
### View the results:
126126
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.
127+
127128
<br><img src="images/TerminalWindow.gif" alt="TerminalWindow" width="1000">
128129

129130

131+
<br>
130132

131133
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.
132134
<br><img src="images/LogicCapture.png" alt="LogicCapture" width="850">
@@ -165,7 +167,7 @@ To check the system clock, go to Project Graph → Plugins → Clock Configurato
165167

166168

167169

168-
170+
<br>
169171

170172
### Step 2: Configuring the System Tick (SysTick)
171173

@@ -176,9 +178,13 @@ To enable SysTick:
176178
1. In the Project Graph, select the System module.
177179
<br><img src="images/SystemModule.png" alt="SystemModule" width="550">
178180

181+
<br>
182+
179183
2. In the Configuration Options panel, expand Cortex M0+ Configuration and Enable the SysTick option
180184
<br><img src="images/SysTickConfig.png" alt="SysTickConfig" width="650">
181185

186+
<br>
187+
182188
### Step 3: Add and Configure the UART Peripheral (SERCOM1)
183189

184190
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:
203209
- All other settings can remain at default for this project.
204210
<br><img src="images/SERCOMConfig.png" alt="SERCOMConfig" width="650">
205211

212+
<br>
206213

207214
### Step 4: Assign UART Pins (SERCOM1)
208215

@@ -221,6 +228,7 @@ To assign the pins:
221228
1. In the Project Graph, open Plugins → Pin Configuration.
222229
<br><img src="images/PinConfigPlugins.png" alt="PinConfigPlugins" width="200">
223230

231+
<br>
224232

225233
2. In the Pin Settings tab. Locate PA16 (Pin #35) and PA17 (Pin #36) in the Pin Table.
226234
- Set the following:
@@ -229,19 +237,21 @@ To assign the pins:
229237
<br><img src="images/PinConfig.png" alt="PinConfig" width="700">
230238

231239

232-
240+
<br>
233241

234242
### Step 5: Generate MCC Code
235243
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.
236244
<br><img src="images/Generate.png" alt="Generate" width="500">
237245

238-
246+
<br>
239247

240248
## Application Source Code
241249
<!-- Describe the main source code structure, including key functions or files, and explain how the application logic works. -->
242250

243251
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.
244252

253+
<br>
254+
245255
### MCC-Generated APIs Used
246256

247257
- `SYSTICK_TimerStart()` – starts the SysTick timer so delay functions are available.
@@ -270,6 +280,7 @@ int main(void)
270280
}
271281
```
272282
283+
<br>
273284
274285
## Conclusion
275286
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

Comments
 (0)