You are currently not logged in and your progress will not be saved. Register or Log in

Exercise 3

Modifying the devicetree

In this exercise, we will customize our device’s devicetree, specifically in this application by changing the baudrate at which information is sent to the console.

1. Create an overlay file in the application directory (the same location as CMakeLists.txt and prj.conf) with the name of the board you’re using, in our case nrf52833dk_nrf52833.overlay.

2. We want to change the baud rate for the UART instance used when printing to console, which is UART0. The baud rate is the property current-speed in the nrf-uart, which is defined and specified in nrf-uart-common.yaml lines 16-38. Add the following to the overlay file to change this property

&uart0 {
	current-speed = <9600>;

3. Build and flash the sample to the board and observe that the resulting log output is gibberish.

4. Change the speed in your terminal emulator to match the speed set in the overlay file, 9600 bps. Now the