Step 5.1: Build and program the application
1
In case of compilation errors, recheck the steps and build the project again.
2
3
Open Tera Term. Navigate to File > New connection > Serial. Select 'COM PORT' and press OK to make a serial connection open. Go to Setup > Serial port… and make sure the baud rate is set to '9600'.
Tera Term displays the value in ASCII format by default. The light sensor values in the demo are in HEX format. Hence, you need to change the Tera Term configuration to HEX format.
To change Tera Term from ASCII format to Hex format:
- Go to the Tera Term installation folder and search for the file TERATERM.INI.
- Open TERATERM.INI and set the debug variable to On.
- Open Tera Term and set up the connection then press Shift + Esc twice to change the mode to Hex format.
4
Once Tera Term is connected, press the RESET button on the SAME54 Xplained Pro Board. You will see a light sensor value displayed every second continuously. Hover your hand nearer to the light sensor present in the I/O1 Xplained board to see the values changing.
Step 5.2: Observe current consumption on Data Visualizer
2
Click on the Connect button to have the Data Visualizer ready to receive information from the Xplained Pro Board.
3
After the Data Visualizer is connected to the Xplained Pro Board, select the 'Power' interface and click on the Start button.
4
On the right-hand side of the Power Analysis window, click on the 'Control Panel' tab and the change settings to the following:
- Change the Channel A mode setting to 'HiRes'
- Enable 'Cursors' in the cursor tab
- Disable 'Auto-scroll'
- Place the cursors at the RTC events to measure event occurring time as shown in below image.
5
Note that the Data Visualizer is showing that the power consumption is low (in sleep mode) for most of the time for the above assignment. Now you are able to see that the power consumption differs between active mode and standby mode, highlighted in orange with text for active mode and sleep mode in the image above.
Results
You observed how the event system and drivers worked together to read and display the light sensor value using the SAME54 Xplained Pro Evaluation Kit and I/O1 Xplained Pro Kit.
Analysis
In this lab, you have successfully created a project from scratch, added drivers and learned how to use the EVENT SYSTEM to drive the events received from the peripherals without CPU intervention. You also learned how to use Atmel START for creating the project, adding and reconfiguring the drivers for your existing project.
Conclusions
In this tutorial, you discovered how to utilize Atmel START for creating your custom projects, adding drivers, configuring the event system, DMA, etc. through hands-on experience. If you need to start creating your custom application with drivers, this tutorial can be used as a reference.