Create Your First Motor Control Application Using MPLAB Harmony v3: Step 6

Hardware Setup

This section describes how to configure the supported hardware.


Mount the ATSAME54 Motor Control Plug-in Module on the U9 header.



Place the External Op-amp Configuration Matrix board at J14.



Connect the motor phases and hall sensor interfaces. Hall and phase connections for Short Hurst motor are given below.



Final Hardware setup:


Build, Program, and Observe the Outputs


Go to File > Project Properties and verify the correct debugger is selected under Hardware Tools. Check that XC32 (v2.41) is selected as the Compiler Toolchain for XC32.



Clean and build your application by clicking on the Clean and Build button.



Program your application to the device, by clicking on the Make and Program button.


The project should build and program successfully.


  1. Press the S2 switch to start the motor.
  2. Press the S3 switch to toggle the motor direction.
  3. Vary the potentiometer to change the speed of the motor.
  4. Press the S2 switch again to stop the motor.


This training module described how to configure and use all the fundamental components needed to build a real-time motor control application on a SAM D5x/E5x microcontroller with the MPLAB Harmony v3 Framework. As a next step, you may customize this application and reconfigure some of the components used in this training module. You could also add new components (PLIBs, etc.) to develop your end application.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.