Issue link: https://resources.mouser.com/i/1442841
16 / Concept to Creation: Practical Applications for Smart, Connected and Secure IoT Solutions Figure 3: The START PINMUX lets you set all pins' functions. (Source: Mouser Electronics) Figure 4: The START clocks let you configure oscillators and clocks. (Source: Mouser Electronics) Configure Pins On the left-hand side of the dashboard, click on the PINMUX tab. Here, we can configure every pin on the ATSAMC21N18A microcontroller (Figure 3). You can configure a pin by selecting it in the list or by clicking it on the diagram. We can give each pin a unique name to easily reference the pin while coding. We can also select input/output pin modes as well as pull-up or pull-down resistors for each pin. Some pin functions are set using the driver configurations in the dashboard (I 2 C pins, UART pins, etc.). Configure Clocks The CLOCKS tab, on the left, allows you to configure… the clocks. Here, we can configure the internal and external oscillators as well as configure the clocks used by the ATSAMC21N Xplained Pro (Figure 4). We can add or remove oscillators and clocks by checking the box next to their names. We can also configure each by clicking the gear under their name. Atmel START shows you which oscillators and clocks are needed for the board with dotted arrows and dynamically changes when components are added or removed. Configure BMI160 Next, we will configure the BMI160. Congratulations! We are now done configuring the BMI160 (it doesn't need configuring). Head on to the next section. Configure RN4870 You only need to configure the RN4870 if you're planning to use the RN4870 Firmware Update Tool or CoolTerm for debugging. If you skip this section, you will need to find the Bluetooth ® addresses of each band and write them in usart.h in BLE_ DEVICE_ADDRESS. Some instructions might change depending on if you are using the RN-4870-SNSR or the MIKROE-2543. For these instructions, we will focus on the RN-4870-SNSR. Install Driver Before anything else, the RN4870 driver needs to be installed. To install the driver: 1. Make sure the RN4870 is not in developer mode by setting the switch, at the bottom of the board, to 1 (OFF). • When set to ON (ON) the RN4870 is in developer mode and, if plugged into the computer, may corrupt the driver installation. • If the status light, when powered, is solid red, then it's in developer mode. • If the driver is corrupted, you will need to uninstall the driver and run through the process again, which can be problematic if you don't have administrative privileges on your work computer (I learned the hard way).