Lucas Murray ME 305 Portfolio
Public Member Functions | Public Attributes | List of all members
driver.DRV8847 Class Reference

A motor driver class for the DRV8847 driver from TI. More...

Public Member Functions

def __init__ (self, timNum)
 Initializes and returns a driver object. More...
 
def enable (self)
 Brings the driver out of sleep mode. More...
 
def disable (self)
 Puts the driver in sleep mode.
 
def faultCB (self, IRQ_src)
 Callback function to run on fault condition. More...
 
def motor (self, pinIn1, pinIn2, chA, chB)
 Creates a DC motor object connected to the driver. More...
 

Public Attributes

 timPWM
 
 nSleep
 
 nFault
 
 faultInt
 

Detailed Description

A motor driver class for the DRV8847 driver from TI.

Objects of this class can be used to configure the DRV8847 motor driver and to create one or more objects of the Motor class which can be used to perform motor control.

Refer to the DRV8847 datasheet here: https://www.ti.com/lit/ds/symlink/drv8847.pdf

Constructor & Destructor Documentation

◆ __init__()

def driver.DRV8847.__init__ (   self,
  timNum 
)

Initializes and returns a driver object.

Parameters
timNumthe timer number for the pins being used

Member Function Documentation

◆ enable()

def driver.DRV8847.enable (   self)

Brings the driver out of sleep mode.

To bring the driver out of sleep mode without causing a fault, the fault pin is disabled for 50 microseconds while it turns on

◆ faultCB()

def driver.DRV8847.faultCB (   self,
  IRQ_src 
)

Callback function to run on fault condition.

Parameters
IRQ_srcThe source of the interrupt request.

◆ motor()

def driver.DRV8847.motor (   self,
  pinIn1,
  pinIn2,
  chA,
  chB 
)

Creates a DC motor object connected to the driver.

Parameters
pinIn1The first pin associated with the motor
pinIn2The second pin associated with the motor
chAThe first channel associated with the motor
chBThe second channel associated with the motor
Returns
An object of class Motor

The documentation for this class was generated from the following file: