Texas Instruments | DRV8847EVM and DRV8847SEVM Software | User Guides | Texas Instruments DRV8847EVM and DRV8847SEVM Software User guides

Texas Instruments DRV8847EVM and DRV8847SEVM Software User guides
User's Guide
SLVUBG2 – June 2018
DRV8847EVM and DRV8847SEVM Software User's Guide
This document is provided with the DRV8847EVM and DRV8847SEVM customer evaluation modules
(EVMs) as a supplement to the DRV8847 Dual H-Bridge Motor Driver data sheet and the DRV8847EVM
and DRV8847SEVM User's Guide to describe the functionality of the software and how to use GUI
application for the DRV8847EVM and DRV8847SEVM (referred to as DRV8847xEVM).
1
2
3
4
5
6
Contents
Overview ...................................................................................................................... 3
Hardware and Software Setup ............................................................................................. 3
Software and Tools Overviews............................................................................................. 3
3.1
GUI Application ..................................................................................................... 3
3.2
Installing Code Composer Studio™ IDE for Software Evaluation .......................................... 13
3.3
Instal the DRV8847x Reference Software Development Package ......................................... 13
3.4
Importing a DRV8847x Project into CCS ...................................................................... 16
Software for Motor Control ................................................................................................ 17
4.1
Overview of Motor Control ....................................................................................... 17
4.2
Software Flow Chart .............................................................................................. 19
Customize I2C Register User Parameters............................................................................... 22
Run the Project in Code Composer Studio ............................................................................. 22
List of Figures
1
DRV8847x EVM GUI (Launch Page) ..................................................................................... 4
2
DRV8847x EVM GUI (Serial Port Page Showing the Required Friendly Name) .................................... 4
3
DRV8847x EVM GUI (COM Opened)..................................................................................... 5
4
DRV8847x EVM GUI (Menu)............................................................................................... 5
5
DRV8847x EVM GUI (Introduction Page) ................................................................................ 6
6
DRV8847x EVM GUI (Registers Page) ................................................................................... 6
7
DRV8847x EVM GUI—Stepper Mode/Dual H-Bridge Control-4-Pin Mode Page ................................... 7
8
DRV8847x EVM GUI—Stepper Mode/Dual H-Bridge Control-2-Pin Mode Page ................................... 8
9
DRV8847x EVM GUI—Parallel Mode Page.............................................................................. 9
10
DRV8847x EVM GUI—Independent Mode Page ...................................................................... 10
11
BOOSTXL-DRV8847x EVM GUI—File Toolbar Menu ................................................................ 11
12
DRV8847x EVM GUI—Tools Toolbar Menu............................................................................ 12
13
DRV8847x EVM GUI—Help Toolbar Menu ............................................................................. 12
14
DRV8847 Firmware Installer Executable File
15
16
17
18
19
20
21
22
23
..........................................................................
Language Selection ........................................................................................................
Software License Agreement ............................................................................................
Installation Directory Path Selection .....................................................................................
Components to Install .....................................................................................................
Warning Message to Close CCS .........................................................................................
FW Package Installation Finish ..........................................................................................
Project Explorer ............................................................................................................
Build Project Files Buttons ...............................................................................................
Execute Buttons ...........................................................................................................
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
13
13
13
14
15
15
16
16
17
17
1
www.ti.com
24
DRV8847x Software Flow Chart ......................................................................................... 19
25
DRV8847x UART Interrupt Flow Chart .................................................................................. 19
26
DRV8847x Timer0_A Interrupt Flow Chart
20
27
DRV8847x Timer1_A Interrupt Flow Chart
21
28
2
DRV8847S I C Register Map
.............................................................................
.............................................................................
............................................................................................
22
Trademarks
MSP430, Code Composer Studio are trademarks of Texas Instruments.
Microsoft, Windows are registered trademarks of Microsoft Inc.
All other trademarks are the property of their respective owners.
2
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Overview
www.ti.com
1
Overview
The DRV8847x customer EVM is a platform for evaluation of DRV8847 device, a low voltage dual Hbridge driver. This device is optimized to control one or two brushed DC motors, or a stepper motor or
solenoids. The DRV8847 device can also be configured to drive a single brushed DC motor using both
output stages in parallel mode to increase the drive current. The EVM has an MSP430™ microcontroller
and an USB interface chip. The USB chip allows for serial communications from a PC where a Microsoft®
Windows® application is used interface with GUI over serial communication. These commands can be
used to control each of the device signals, and drive the motors at the desired rate. The microcontroller
firmware outputs the control signals and PWM signals to move the motor. The firmware also monitors the
nFAULT signal to alert the GUI that a FAULT has occurred and describes the nature of fault in case of
DRV8847S device. This document describes the software and tools used to evaluate DRV8847 device for
stepper motor and brushed DC operation on the DRV8847xEVM.
For more information on these modes, refer to the DRV8847 Dual H-Bridge Motor Driver data sheet.
2
Hardware and Software Setup
The hardware (HW) and software (SW) tools that follow are required for the evaluation of DRV8847
device:
• DRV8847x EVM
• Brushed motors, stepper motors and solenoids
• Voltage supply from 2.7 V to 18 V
• Jumper wires (for connections)
• Code Composer Studio™ software V6.0 and newer
This document only describes the installation and usage of the DRV8847x EVM GUI. For additional details
on hardware connections refer to the DRV8847EVM and DRV8847SEVM User's Guide.
3
Software and Tools Overviews
3.1
GUI Application
3.1.1
Install the GUI
Download and run the installer file, Setup_DRV8847-1.0.0_EVM.exe, to install the GUI application.
3.1.2
Use the DRV8847x EVM GUI
Use the DRV8847x EVM and GUI to change various settings and to control brushed motors, stepper
motors, and solenoids. The DRV8847x EVM GUI lets the user adjust the speed and direction of the motor,
change parameters of the motor-control algorithm, and monitor the device status. Do these steps to get
started with the GUI:
Step 1. Attach the brushed or stepper motors.
Step 2. Connect the micro-USB cable with the PC.
Step 3. Enable the motor power supply. For additional details on hardware connections refer to the
DRV8847x EVM User's Guide.
Step 4. Click on DRV8847x EVM GUI shortcut either on the desktop or from the start menu to run the
GUI application.
Step 5. Select the device variant to be used on the launch page shown in Figure 1.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
3
Software and Tools Overviews
www.ti.com
Figure 1. DRV8847x EVM GUI (Launch Page)
The first matching device (the device supported by the application for the selected variant) that gets
connected to the PC is connected automatically. If multiple devices are connected go to the Serial Port
page to manually select an available COM port. The Serial Port page shows the list of available COM
ports. Use the connect and disconnect buttons on the Serial Port page to change the matching devices
in the application as shown in Figure 2. If nothing is physically connected to the PC, the GUI shows a
status of -- No Device Connected –. If the connected device needs to use a different COM port, click
the Disconnect button in the connected COM port. Click the Connect button in the COM port that
needs to be connected.
Figure 2. DRV8847x EVM GUI (Serial Port Page Showing the Required Friendly Name)
Step 6.
4
Make sure that the GUI shows the Connected status after the GUI connects (see Figure 3).
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
The bottom-left corner of the status bar shows a green indicator to indicate the connection
with the opened COM port and with the device.
Figure 3. DRV8847x EVM GUI (COM Opened)
3.1.2.1
Use the Side-Bar Menu
Click on the hamburger button in the top-left corner of the GUI to open the side-bar menu.
Use the side-bar menu to navigate to the following pages or sub-pages at any time. The pages that follow
are in context of the launched device:
• Home
• Registers
• Stepper Motor/Dual H Bridge Control
• Serial Port
• Back
Figure 4. DRV8847x EVM GUI (Menu)
3.1.2.1.1
Home Page
Click the home icon to go to the Home page. The Home page has the general information about the
DRV8847x EVM device and links to additional information.
• Click the EVM Setup Video button to play the video that explains the EVM Setup process.
• Click the Register Map link to open the Register Map page.
• Click any of the four buttons under the What would you like to drive? section to open the Motor Control
page under the corresponding mode.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
5
Software and Tools Overviews
www.ti.com
Figure 5. DRV8847x EVM GUI (Introduction Page)
3.1.2.1.2
Register Map Page
The Register Map page shows all the registers and their fields on the DRV8847 device. The Register Map
page lets the user read and write to any register, field, or bit. Click on the question mark icon on any
register or field to get in-place data sheet help. The Register Map page is available only for the S variant
of the DRV8847 device.
Figure 6. DRV8847x EVM GUI (Registers Page)
6
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
3.1.2.1.3
Motor Control Page
The Motor Control page has four pages for motor control:
• Stepper Mode / Dual H-Bridge Control – 4-pin
• Stepper Mode / Dual H-Bridge Control – 2-Pin
• Independent Mode
• Parallel Mode
The correct page is shown automatically. The Motor Control page and the side-bar menu change based
on the type of bridge control mode that is selected.
Each page has different widget controls to control the motor and tune its parameters.
3.1.2.1.3.1 Stepper Mode/Dual H-Bridge Control-4-Pin
The Stepper Mode/Dual H-Bridge Control-4-Pin page has different widget controls to control the motor and
tune the parameters as shown in Figure 7.
Figure 7. DRV8847x EVM GUI—Stepper Mode/Dual H-Bridge Control-4-Pin Mode Page
Click on the question mark icon for each of the controls in the GUI to learn about the operation and range
of input values of that particular widget.
Do these steps to run the motor in 4-pin mode:
Step 1. Click on the Driver Enable toggle button to enable the driver. The driver must be enabled first
before other controls are enabled.
Step 2. If necessary, write the values to the registers from the Register Page. If the driver is disabled,
register read-write (R/W) operations are disabled.
Step 3. If necessary, set the I2C slave address.
Step 4. Set the Bridge Control Mode to 4-Pin Interface.
Step 5. Set the Stepping Mode to Half Stepping or Independent Bridge. The controls under the PWM
Control tab change based on the selection of the Stepping Mode.
Step 6. Set the PWM Switching Frequency applied to the motor. This configuration is available only
when the Stepping Mode is set to Independent Bridge.
Step 7. If any fault occurs, the FAULT STATUS section on the right side of the GUI reports the fault.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
7
Software and Tools Overviews
Step 8.
Step 9.
Step 10.
Step 11.
Step 12.
Step 13.
www.ti.com
Do the necessary actions to clear the fault. For example, change the motor parameter values
related to the fault.
Use the widgets under the Fault Configuration tab to do the fault-related operations.
Click the Bridge Enable/Start Motor toggle button or FET Enable toggle button to start the
motor. These buttons are available based on the selected Stepping Mode. When these
buttons are enabled, all the register controls, Driver Enable, Bridge Control Mode, and
Stepping Mode change to non-editable mode until the Bridge Enable/Start Motor or FET
Enable toggle buttons are disabled.
Use the other widgets on the PWM Control tab to tune the motor.
Use the Current Regulations Tab on the right side to calculate the ITRIP value.
Click the Fault Settings button to display the Fault Settings tab. This tab is available only for
the S variant of the DRV8847 device.
3.1.2.1.3.2 Stepper Mode/Dual H-Bridge Control-2-Pin
The Stepper Mode/Dual H-Bridge Control-2-Pin page has different widget controls to control the motor and
tune the parameters as shown in Figure 8.
Figure 8. DRV8847x EVM GUI—Stepper Mode/Dual H-Bridge Control-2-Pin Mode Page
Click on the question mark icon for each of the controls in the GUI to learn about the operation and range
of input values of that particular widget.
Do these steps to run the motor with a 2-pin mode:
Step 1. Click on the Driver Enable toggle button to enable the driver. The driver must be enabled first
before other controls are enabled.
Step 2. If necessary, write the values to the registers from the Register Page. If the driver is disabled,
register read-write (R/W) operations are disabled.
Step 3. If necessary, set the I2C slave address.
Step 4. Set the Bridge Control Mode to 2-Pin Interface.
Step 5. If any fault occurs, the FAULT STATUS section on the right side of the GUI reports the fault.
Step 6. Do the necessary actions to clear the fault. For example, change the motor parameter values
related to the fault.
Step 7. Use the widgets under the Fault Configuration tab to do the fault-related operations.
8
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
Step 8.
Click the Bridge Enable/Start Motor toggle button to start the motor. When this button is
enabled, all the register controls, Driver Enable, and Bridge Control Mode change to noneditable mode until the Bridge Enable/Start Motor or FET Enable toggle buttons are disabled.
Step 9. Use the other widgets on the PWM Control tab to tune the motor.
Step 10. Use the Current Regulations Tab on the right side to calculate the ITRIP value.
Step 11. Click the Fault Settings button to display the Fault Settings tab. This tab is available only for
the S variant of the DRV8847 device.
3.1.2.1.3.3 Parallel Mode
The Parallel Mode page has different widget controls to control the motor and tune the parameters as
shown in Figure 9.
Figure 9. DRV8847x EVM GUI—Parallel Mode Page
Click on the question mark icon for each of the controls in the GUI to learn about the operation and range
of input values of that particular widget.
Do these steps to run the motor with a parallel mode.
Step 1. Click on the Driver Enable toggle button to enable the driver. The driver must be enabled first
before other controls are enabled.
Step 2. If necessary, write the values to the registers from the Register Page. If the driver is disabled,
register read-write (R/W) operations are disabled.
Step 3. If necessary, set the I2C slave address.
Step 4. Set the Bridge Control Mode to Parallel Bridge Interface.
Step 5. If any fault occurs, the FAULT STATUS section on the right side of the GUI reports the fault.
Step 6. Do the necessary actions to clear the fault. For example, change the motor parameter values
related to the fault.
Step 7. Use the widgets under the Fault Configuration tab to do the fault-related operations.
Step 8. Click the FET Enable toggle button to start the motor. When this button is enabled, all the
register controls, Driver Enable, and Bridge Control Mode change to non-editable mode until
the Bridge Enable/Start Motor or FET Enable toggle buttons are disabled.
Step 9. Use the other widgets on the PWM Control tab to tune the motor.
Step 10. Use the Current Regulations Tab on the right side to calculate the ITRIP value.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
9
Software and Tools Overviews
www.ti.com
Step 11. Click the Fault Settings button to display the Fault Settings tab. This tab is available only for
the S variant of the DRV8847 device.
3.1.2.1.3.4 Independent Mode
The Independent Mode page has different widget controls to control the motor and tune the parameters as
shown in Figure 10.
Figure 10. DRV8847x EVM GUI—Independent Mode Page
Click on the question mark icon for each of the controls in the GUI to learn about the operation and range
of input values of that particular widget.
Do these steps to run the motor with independent mode:
Step 1. Click on the Driver Enable toggle button to enable the driver. The driver must be enabled first
before other controls are enabled.
Step 2. If necessary, write the values to the registers from the Register Page. If the driver is disabled,
register read-write (R/W) operations are disabled.
Step 3. If necessary, set the I2C slave address.
Step 4. Set the Bridge Control Mode to Independent Bridge Interface.
Step 5. Set the PWM Switching Frequency applied to the motor.
Step 6. If any fault occurs, the FAULT STATUS section on the right side of the GUI reports the fault.
Step 7. Do the necessary actions to clear the fault. For example, change the motor parameter values
related to the fault.
Step 8. Use the widgets under the Fault Configuration tab to do the fault-related operations.
Step 9. If necessary, click the FET Enable toggle button for each OUT to start the motor. When this
button is enabled, all the register controls, Driver Enable, and Bridge Control Mode change to
non-editable mode until the Bridge Enable/Start Motor or FET Enable toggle buttons are
disabled.
Step 10. Use the other widgets on the PWM Control tab to tune the motor.
Step 11. Click the Fault Settings button to display the Fault Settings tab. This tab is available only for
the S variant of the DRV8847 device.
10
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
3.1.2.1.4
Toolbar Options
The toolbar menu has these options:
• File
• Tools
• Help
3.1.2.1.4.1 File Menu
The File menu has different options to load the configuration from a file into the GUI and save the current
configuration in the GUI into a file. The GUI has options to load and save registers and motor controls as
shown in Figure 11.
NOTE: The user can save (and load) a particular configuration of the registers and the Motor
Control parameters (as set on the Motor Control pages). This feature can also be used when
no EVM is connected to the computer.
Figure 11. BOOSTXL-DRV8847x EVM GUI—File Toolbar Menu
3.1.2.1.4.2 Tools Menu
The Tools menu has only one option to open a log page at the bottom of the GUI. The log page shows
different logs for information, warning, error, and debug.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
11
Software and Tools Overviews
www.ti.com
Figure 12. DRV8847x EVM GUI—Tools Toolbar Menu
3.1.2.1.4.3 Help Menu
The Help menu shows the information about this GUI application under the About option.
Figure 13. DRV8847x EVM GUI—Help Toolbar Menu
12
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
3.2
Installing Code Composer Studio™ IDE for Software Evaluation
For detailed steps for installation and setup of the Code Composer Studio™ software, go to:
http://softwaredl.ti.com/trainingTTO/trainingTTO_public_sw/MSP430_LaunchPad_Workshop/v2.20/MSP430_Workshop_I
nstallation_Guide_v2.22.pdf
3.3
Instal the DRV8847x Reference Software Development Package
The DRV8847x reference software has files required to program DRV8847 device in addition to
TMS320G2553 using Code Composer Studio (CCS) software version 6.2.X. All of these files are included
in the installation package. To get access to this package, contact the DRV8847 applications team or the
respective field sales engineer.
To install the reference software development package, follow these steps:
1. Double click the executable file (.exe) for the DRV8847x reference software installer (see Figure 14).
Figure 14. DRV8847 Firmware Installer Executable File
2. Follow the prompts to select another language from the default of English (see Figure 15).
Figure 15. Language Selection
3. Read through and accept the license agreement to proceed with the installation.
Figure 16. Software License Agreement
4. Select the destination location for the example CCS projects and the documentation. This destination
can be set to any location in the PC.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
13
Software and Tools Overviews
www.ti.com
Figure 17. Installation Directory Path Selection
14
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software and Tools Overviews
www.ti.com
5. Select the DRV8847x components to install.
Figure 18. Components to Install
6. Make sure all running instances of CCS are closed.
Figure 19. Warning Message to Close CCS
7. Continue with the installation process.
8. Click the Next button to install after reviewing the settings.
9. Click the Finish button when the files are successfully installed in the destination folder.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
15
Software and Tools Overviews
www.ti.com
Figure 20. FW Package Installation Finish
3.4
Importing a DRV8847x Project into CCS
When the CCS software is started, the user must first select a workspace. A workspace is the structure in
which projects are stored. Multiple projects can be saved in one workspace. Texas Instruments
recommends starting with the project for the specific DRV8x device. After importing an existing project, the
user can explore the features of CCS to become familiar with the IDE.
Follow these steps to import a DRV8847x project:
Step 1. Double click the CCS icon to open the application(a CCS icon is added to the desktop after
installation).
Step 2. Select the location and name of the workspace. The location and naming convention can be
changed based on the user's preference.
Step 3. Click the OK button to accept.
Step 4. Import a project either from the welcome menu by selecting Import Project or go to the
Project menu and select Import Existing CCS Eclipse Project.
Step 5. Make sure that the project appears in the Project Explorer window after the projects are
imported to the workspace as shown in Figure 21.
Figure 21. Project Explorer
16
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software for Motor Control
www.ti.com
Step 6.
Explore the project files, build the project to create an image to be downloaded on the
TMS320G2553 device, and download the project from the Project Explorer window. Make
sure the DRV8847xEVM is connected to the PC through the USB interface before
downloading the code.
Figure 22. Build Project Files Buttons
Step 7.
When the CCS software is connected to the device, run the program from the CCS IDE to
execute the program in hardware by clicking the green play button (see Figure 23). Click the
red stop button (see Figure 23) to disconnect the MSP-FET430UIF from the EVM.
Figure 23. Execute Buttons
4
Software for Motor Control
4.1
Overview of Motor Control
The DRV8847 device integrates two H-bridges to drive two DC motors, a bipolar stepper motor, or the
solenoid loads. The device can be configured in four different operating modes depending on user
requirements. Depending on the selected interface (4-pin interface, 2-pin interface, parallel bridge
interface, or the independent bridge interface) the input pins of theDRV8847 device are driven with the
correct sequence required for H-bridge operation which is done by a microcontroller. The software controls
the inputs (IN1, IN2, IN3, and IN4) of the DRV8847 device for different modes and interfaces and,
therefore, controls the speed of the connected motor. The software also enables start and stop of the
motor using the GUI.
The stepper motor can be controlled in full-stepping and half-stepping mode using the 2-pin or 4-pin
interface respectively. All four modes can be used to control a single or dual BDC motor. The DRV8847
device supports operation of solenoids and relays using an independent interface. For more information,
refer to the DRV8847 Dual H-Bridge Motor Driver data sheet.
The speed of the stepper motor is represented in pulses per seconds (PPS). Use Equation 2 to calculate
the PPS, or speed of the motor, which is determined by number of steps per 360 degrees of revolution
(see Equation 1).
(1)
(2)
The PPS value is programmed as the Timer value in the software to generate interrupts at a periodic
interval. The timer interrupt service routine drives current through each winding depending on the
sequence programmed for full stepping or half stepping mode.
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
17
Software for Motor Control
4.1.1
www.ti.com
Half Stepping Mode Using 4-Pin Interface for Stepper Motor
The DRV8847 device can control a stepper motor in half stepping mode. The user selects the interface as
4-pin and selects the stepper mode as half step mode. The speed of the stepper motor is determined by
the PPS. The number of steps per revolution in this case is 8, and therefore the timer interval is
programmed appropriately. The timer service routine sequences the PWM inputs connected to the IN1,
IN2, IN3, and IN4 pins as shown in the DRV8847 data sheet.
The motor can be started and stopped by the Bridge Enable/Motor Start button and Bridge Disable/Motor
Stop button respectively.
4.1.2
Full Stepping Mode Using 2-Pin Interface for Stepper Motor
The DRV8847 device can control a stepper motor in full stepping mode. The user selects the interface as
2-pin which sets the stepper mode as full step mode. The speed of the stepper motor is determined by the
PPS. The number of steps per revolution in this case is 4, and therefore the timer interval is programmed
appropriately. The timer service routine sequences the PWM inputs connected to the IN1 and IN2 pins as
shown in the DRV8847 data sheet.
The motor can be started and stopped by the Bridge Enable/Motor Start button and Bridge Disable/Motor
Stop button respectively.
4.1.3
Independent Mode Using 4-Pin Interface for Brushed DC Motor
The software can run relay or solenoid coils connected to the VM pin or ground and a single or dual BDC
motor. The user selects the interface as 4-pin and selects the stepper mode as independent mode. The
PWM duty cycle can be adjusted through the slider in the GUI with a minimum duty cycle that is greater
than 10%. The Timer A1 is used to generate PWM inputs to the IN1, IN2, IN3, and IN4 pins
independently. The RAMP_RATE_DELAY parameter in the GUI sets the number of PWM_PERIOD
interrupts that must occur before adjusting the duty cycle. Changing this value changes how fast the duty
cycle is adjusted
4.1.4
Parallel Bridge Interface to Drive a Higher Current Brushed DC Motor
The software can run a higher-current BDC motor. The user selects the interface as parallel mode. The
PWM duty cycle can be adjusted through the slider in the GUI with a minimum duty cycle that is greater
than 10%. The Timer A1 is used to generate PWM inputs to the IN1 and IN2 pins. The
RAMP_RATE_DELAY parameter in the GUI sets the number of PWM_PERIOD interrupts that must occur
before adjusting the duty cycle. Changing this value changes how fast the duty cycle is adjusted
4.1.5
Independent Bridge Interface
The software can run relay or solenoid coils connected to the VM pin or ground and a single or dual BDC
motor. The user selects the interface as Independent half bridge interface and selects the stepper mode
as independent mode. The PWM duty cycle can be adjusted through the slider in the GUI with a minimum
duty cycle that is greater than 10%. The Timer A1 is used to generate PWM inputs to the IN1, IN2, IN3,
and IN4 pins independently. The RAMP_RATE_DELAY parameter in the GUI sets the number of
PWM_PERIOD interrupts that must occur before adjusting the duty cycle. Changing this value changes
how fast the duty cycle is adjusted.
18
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software for Motor Control
www.ti.com
4.2
Software Flow Chart
The software starts from the main.c file in the project.
4.2.1
Main, DRV8x State Machine and Port Interrupt Service Routine
Figure 24 shows the flow chart of the DRV8847x software.
Figure 24. DRV8847x Software Flow Chart
4.2.2
UART Receive and Transmit ISR
Figure 25 shows the interrupt flow chart for the UART.
Figure 25. DRV8847x UART Interrupt Flow Chart
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
19
Software for Motor Control
4.2.3
www.ti.com
Timer0_A0 Interrput ISR
Figure 26 shows the interrupt flow chart for Timer0_A.
Figure 26. DRV8847x Timer0_A Interrupt Flow Chart
20
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
Software for Motor Control
www.ti.com
4.2.4
Timer1_A Interrput ISR
Figure 27 shows the interrupt flow chart for Timer1_A.
Figure 27. DRV8847x Timer1_A Interrupt Flow Chart
SLVUBG2 – June 2018
Submit Documentation Feedback
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
21
Customize I2C Register User Parameters
5
www.ti.com
Customize I2C Register User Parameters
Set the I2C register settings of the DRV8847 device as described in the DRV8847 Dual H-Bridge Motor
Driver data sheet. Adjust the register settings on the register map page in the GUI.
Figure 28. DRV8847S I2C Register Map
6
Run the Project in Code Composer Studio
Do these steps to run the project in CCS:
1. Modify the project for a specific motor as needed.
2. Compile the modified project.
3. Run the project in CCS.
4. Connect the GUI.
5. Control the selected motor on a specific interface.
22
DRV8847EVM and DRV8847SEVM Software User's Guide
Copyright © 2018, Texas Instruments Incorporated
SLVUBG2 – June 2018
Submit Documentation Feedback
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,
reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are
developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you
(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of
this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI
products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,
enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your
applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications
(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You
represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that
might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you
will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any
testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include
the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO
ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY
RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or
endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR
REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO
ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT
LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF
DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,
COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR
ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your noncompliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.
These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2018, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising