Purpose
This example demonstrates the HSB BUS Matrix (HMATRIX) provided on SAM microcontrollers.
Requirements
This example can be used on any SAM4L boards.
Description
This example shows running speed between two matrix configurations. The LED toggle times in one second is measured. The first test is done with Round-Robin arbitration without default master. The second test is done with Round-Robin arbitration with last access master. As expected, the LED toggle times of test1 is lower than that of test2.
Usage
- Build the program and download it into the evaluation board.
- On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- Start the application.
- In the terminal window, the following text should appear:
-- HMATRIX Example --
-- xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
Configure system tick to get 1ms tick period.
-- Test1: configure Round-Robin arbitration without default master. --
Led toggled xxx times in one second
-- Test2: configure Round-Robin arbitration with last access master. --
Led toggled xxx times in one second