MSPM0L1306HallSensoredTrapMotorControlLibrary  1.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
LP_MSPM0L1306 - Hardware Abstraction Layer (HAL)

Data Structures

struct  HAL_GPIO_Instance_
 Defines a GPIO instance. More...
 
struct  HAL_ADC_instance_
 Defines a ADC instance. More...
 
struct  HAL_Timer_Instance_
 Defines a timer instance. More...
 
struct  HAL_fault_instance
 Defines a fault instance. More...
 

Macros

#define HAL_SYSTEM_FREQ_MHZ   ((int32_t)32)
 Defines the system clock frequency, MHz.
 
#define HAL_PWM_TIMER_FREQ_MHZ   ((int32_t)32)
 Defines the pwm timer frequency in MHz.
 
#define HAL_CAPTURE_TIMER_FREQ   ((int32_t)40000)
 Defines the input capture timer frequency in Hz.
 
#define HAL_VDDA_REFVOLTAGE   (3300)
 Defines default ADC refernce voltage.
 
#define MAX_ADC_VALUE   (4095)
 Defines ADC max value.
 

Typedefs

typedef struct HAL_GPIO_Instance_ HAL_GPIO_Instance
 Defines a GPIO instance.
 
typedef struct HAL_ADC_instance_ HAL_ADC_instance
 Defines a ADC instance.
 
typedef struct HAL_Timer_Instance_ HAL_Timer_Instance
 Defines a timer instance.
 
typedef struct HAL_fault_instance HAL_fault_Instance
 Defines a fault instance.
 

Enumerations

enum  HAL_GPIO_STATE {
  HAL_GPIO_PIN_LOW = 0,
  HAL_GPIO_PIN_HIGH
}
 
enum  HAL_ADC_CHAN {
  HAL_ADC_CHAN_0 = 0,
  HAL_ADC_CHAN_1,
  HAL_ADC_CHAN_MAX
}
 
enum  HAL_GPIO_IN {
  HAL_GPIO_IN_01 = 0,
  HAL_GPIO_IN_02,
  HAL_GPIO_IN_03,
  HAL_GPIO_IN_04,
  HAL_GPIO_IN_MAX
}
 
enum  HAL_GPIO_OUT {
  HAL_GPIO_OUT_01 = 0,
  HAL_GPIO_OUT_02,
  HAL_GPIO_OUT_03,
  HAL_GPIO_OUT_MAX
}
 
enum  HAL_PWM {
  HAL_PWM_01 = 0,
  HAL_PWM_02,
  HAL_PWM_03,
  HAL_PWM_MAX
}
 
enum  HAL_CAPTURE_TIMER {
  HAL_CAPTURE_TIMER_01 = 0,
  HAL_CAPTURE_TIMER_MAX
}
 
enum  HAL_FAULT_INPUT {
  HAL_FAULT_INPUT_1,
  HAL_FAULT_INPUT_MAX
}
 
enum  HAL_SPI_CHAN {
  HAL_SPI_CHAN_0 = 0,
  HAL_SPI_CHAN_MAX
}
 
enum  HAL_SPI_CS {
  HAL_SPI_CS_0 = 0,
  HAL_SPI_CS_1,
  HAL_SPI_CS_2,
  HAL_SPI_CS_3,
  HAL_SPI_CS_MAX
}
 
enum  HAL_ADC_VREF {
  HAL_ADC_VREF_VDDA = 0,
  HAL_ADC_VREF_INTERNAL,
  HAL_ADC_VREF_EXTERNAL
}
 
enum  HAL_ADC_INT_VREF {
  HAL_ADC_INT_VREF_2P5V = DL_VREF_BUFCONFIG_OUTPUT_2_5V,
  HAL_ADC_INT_VREF_1P4V = DL_VREF_BUFCONFIG_OUTPUT_1_4V
}
 
enum  HAL_ADC_IIDX {
  HAL_ADC_IIDX_OVERFLOW = DL_ADC12_IIDX_OVERFLOW,
  HAL_ADC_IIDX_TRIG_OVERFLOW = DL_ADC12_IIDX_TRIG_OVERFLOW,
  HAL_ADC_IIDX_WINDOW_COMP_HIGH = DL_ADC12_IIDX_WINDOW_COMP_HIGH,
  HAL_ADC_IIDX_WINDOW_COMP_LOW = DL_ADC12_IIDX_WINDOW_COMP_LOW,
  HAL_ADC_IIDX_INIFG = DL_ADC12_IIDX_INIFG,
  HAL_ADC_IIDX_DMA_DONE = DL_ADC12_IIDX_DMA_DONE,
  HAL_ADC_IIDX_UNDERFLOW = DL_ADC12_IIDX_UNDERFLOW,
  HAL_ADC_IIDX_MEM0_RESULT_LOADED = DL_ADC12_IIDX_MEM0_RESULT_LOADED,
  HAL_ADC_IIDX_MEM1_RESULT_LOADED = DL_ADC12_IIDX_MEM1_RESULT_LOADED,
  HAL_ADC_IIDX_MEM2_RESULT_LOADED = DL_ADC12_IIDX_MEM2_RESULT_LOADED,
  HAL_ADC_IIDX_MEM3_RESULT_LOADED = DL_ADC12_IIDX_MEM3_RESULT_LOADED,
  HAL_ADC_IIDX_MEM4_RESULT_LOADED = DL_ADC12_IIDX_MEM4_RESULT_LOADED,
  HAL_ADC_IIDX_MEM5_RESULT_LOADED = DL_ADC12_IIDX_MEM5_RESULT_LOADED,
  HAL_ADC_IIDX_MEM6_RESULT_LOADED = DL_ADC12_IIDX_MEM6_RESULT_LOADED,
  HAL_ADC_IIDX_MEM7_RESULT_LOADED = DL_ADC12_IIDX_MEM7_RESULT_LOADED,
  HAL_ADC_IIDX_MEM8_RESULT_LOADED = DL_ADC12_IIDX_MEM8_RESULT_LOADED,
  HAL_ADC_IIDX_MEM9_RESULT_LOADED = DL_ADC12_IIDX_MEM9_RESULT_LOADED,
  HAL_ADC_IIDX_MEM10_RESULT_LOADED = DL_ADC12_IIDX_MEM10_RESULT_LOADED,
  HAL_ADC_IIDX_MEM11_RESULT_LOADED = DL_ADC12_IIDX_MEM11_RESULT_LOADED
}
 

Functions

void HAL_init ()
 Initializes the hal object. More...
 
bool HAL_readGPIOPin (HAL_GPIO_IN pin)
 Reads a GPIOpin. More...
 
void HAL_writeGPIOPin (HAL_GPIO_OUT pin, HAL_GPIO_STATE value)
 Write to GPIOpin. More...
 
void HAL_setDeadband (HAL_PWM pwm, uint16_t deadband)
 Sets deadband for timer. More...
 
void HAL_setPWMFreq (HAL_PWM pwm, uint32_t PWMFreq)
 Sets PWMfreq for all timers. More...
 
void HAL_writeSPI16 (HAL_SPI_CHAN chan, HAL_SPI_CS cs, uint16_t data)
 Write data to spi. More...
 
uint16_t HAL_readSPI16 (HAL_SPI_CHAN chan, HAL_SPI_CS cs)
 Read data from spi. More...
 
void HAL_setADCRefVoltage (HAL_ADC_CHAN chan, uint16_t voltage_mV)
 Set ADC reference voltage. More...
 
uint32_t HAL_getmvFromADC (HAL_ADC_CHAN chan)
 Get milli volts from ADC. More...
 
_iq20 HAL_getIQ20VoltageFromADC (HAL_ADC_CHAN chan)
 Get volts from ADC in _IQ20. More...
 
HAL_ADC_IIDX HAL_processADCIRQ (ADC12_Regs *adcInst)
 Read ADC values from results. More...
 
void HAL_enableADCInterrupt (HAL_ADC_CHAN chan)
 Enables ADC interrupts. More...
 
void HAL_enableGPIOInterrupt (HAL_GPIO_IN pin)
 Enables GPIO interrupts. More...
 
void HAL_enablePWMInterrupt (HAL_PWM PWM)
 Enables PWM interrupts. More...
 
void HAL_enableCaptureInterrupt (HAL_CAPTURE_TIMER capture)
 Enables capture interrupts. More...
 
void HAL_setADCVRefVDDA (HAL_ADC_CHAN chan)
 Set ADC voltage reference to VDDA. More...
 
void HAL_setADCVRefInternal (HAL_ADC_CHAN chan, HAL_ADC_INT_VREF internalVRef)
 Set ADC voltage reference to internal reference. More...
 
void HAL_setADCVRefExternal (HAL_ADC_CHAN chan, uint16_t externalVRef)
 Set ADC voltage reference to external reference. More...
 
bool HAL_getTimerFaultStatus (HAL_FAULT_INPUT fault)
 Read the PWM timer fault bit. More...
 
uint32_t HAL_getCaptureFrequency (HAL_CAPTURE_TIMER capture)
 Calculates the capture frequency. More...
 
void HAL_ADCVRefSel (HAL_ADC_VREF adcRef, HAL_ADC_CHAN chan, HAL_ADC_INT_VREF internalVRef, uint16_t externalVRef)
 updates the adc voltage reference More...
 
__STATIC_INLINE void HAL_delayMicroSeconds (uint32_t microSeconds)
 Delays for specific time in microseconds. More...
 
__STATIC_INLINE void HAL_updatePWM (const HAL_PWM posPhase, const HAL_PWM gndPhase, const HAL_PWM opnPhase, const uint16_t PWMDuty)
 Writes the pwm to the pinouts. More...
 
__STATIC_INLINE void HAL_PWMOutputLow (const HAL_PWM gndPhase_1, const HAL_PWM gndPhase_2, const HAL_PWM gndPhase_3)
 Set all PWM outputs low. More...
 
__STATIC_INLINE void HAL_PWMOutputHigh (const HAL_PWM gndPhase_1, const HAL_PWM gndPhase_2, const HAL_PWM gndPhase_3)
 Set complementary PWM outputs high. More...
 

Variables

HAL_Timer_Instance PWMBase [HAL_PWM_MAX]
 Array for storing the PWM instances.
 
HAL_Timer_Instance inputCapture [HAL_CAPTURE_TIMER_MAX]
 Array to store the capture instances.
 
HAL_ADC_instance ADCChannel [HAL_ADC_CHAN_MAX]
 Array for storing the ADC instances.
 
HAL_fault_Instance faultInput [HAL_FAULT_INPUT_MAX]
 Array to store the fault instances.
 

Detailed Description

Overview

The HAL module provides micro-controller agnostic set of application programming interfaces (APIs) to be used by other module's in the library as well as in the user's application code.


Enumeration Type Documentation

§ HAL_GPIO_STATE

Enumerator
HAL_GPIO_PIN_LOW 

GPIO set to low.

HAL_GPIO_PIN_HIGH 

GPIO set to high.

§ HAL_ADC_CHAN

Enumerator
HAL_ADC_CHAN_0 

Index associated to ADC Channel 0.

HAL_ADC_CHAN_1 

Index associated to ADC Channel 1.

HAL_ADC_CHAN_MAX 

Total number of ADC channels.

§ HAL_GPIO_IN

Enumerator
HAL_GPIO_IN_01 

Index associated to input GPIO PIN 1.

HAL_GPIO_IN_02 

Index associated to input GPIO PIN 2.

HAL_GPIO_IN_03 

Index associated to input GPIO PIN 3.

HAL_GPIO_IN_04 

Index associated to input GPIO PIN 4.

HAL_GPIO_IN_MAX 

Total number of input GPIO pins.

§ HAL_GPIO_OUT

Enumerator
HAL_GPIO_OUT_01 

Index associated to output GPIO PIN 1.

HAL_GPIO_OUT_02 

Index associated to output GPIO PIN 2.

HAL_GPIO_OUT_03 

Index associated to output GPIO PIN 3.

HAL_GPIO_OUT_MAX 

Total number of output GPIO pins.

§ HAL_PWM

enum HAL_PWM
Enumerator
HAL_PWM_01 

Index associated to PWM channel 1.

HAL_PWM_02 

Index associated to PWM channel 2.

HAL_PWM_03 

Index associated to PWM channel 3.

HAL_PWM_MAX 

Total number of PWM channels.

§ HAL_CAPTURE_TIMER

Enumerator
HAL_CAPTURE_TIMER_01 

Index associated to input capture 1.

HAL_CAPTURE_TIMER_MAX 

Total number of input captures.

§ HAL_FAULT_INPUT

Enumerator
HAL_FAULT_INPUT_1 

Index associated to fault 1.

HAL_FAULT_INPUT_MAX 

Total number of faults.

§ HAL_SPI_CHAN

Enumerator
HAL_SPI_CHAN_0 

Index associated to SPI channel 0.

HAL_SPI_CHAN_MAX 

Total number of SPI channels.

§ HAL_SPI_CS

enum HAL_SPI_CS
Enumerator
HAL_SPI_CS_0 

Index associated to chip select 0.

HAL_SPI_CS_1 

Index associated to chip select 0.

HAL_SPI_CS_2 

Index associated to chip select 0.

HAL_SPI_CS_3 

Index associated to chip select 0.

HAL_SPI_CS_MAX 

Total number of chip select pins.

§ HAL_ADC_VREF

Enumerator
HAL_ADC_VREF_VDDA 

ADC Reference VDDA.

HAL_ADC_VREF_INTERNAL 

ADC Internal Reference.

HAL_ADC_VREF_EXTERNAL 

ADC External Reference.

§ HAL_ADC_INT_VREF

Enumerator
HAL_ADC_INT_VREF_2P5V 

ADC Internal Reference 2.5V.

HAL_ADC_INT_VREF_1P4V 

ADC Internal Reference 1.4V.

§ HAL_ADC_IIDX

Enumerator
HAL_ADC_IIDX_OVERFLOW 

ADC12 interrupt index for MEMRESX overflow.

HAL_ADC_IIDX_TRIG_OVERFLOW 

ADC12 interrupt index for sequence conversion trigger overflow.

HAL_ADC_IIDX_WINDOW_COMP_HIGH 

ADC12 interrupt index for MEMRESx result higher than window comparator high threshold.

HAL_ADC_IIDX_WINDOW_COMP_LOW 

ADC12 interrupt index for MEMRESx result lower than window comparator low threshold.

HAL_ADC_IIDX_INIFG 

ADC12 interrupt index for result in range.

HAL_ADC_IIDX_DMA_DONE 

ADC12 interrupt index for DMA done.

HAL_ADC_IIDX_UNDERFLOW 

ADC12 interrupt index for MEMRESX underflow.

HAL_ADC_IIDX_MEM0_RESULT_LOADED 

ADC12 interrupt index for MEM0 result loaded interrupt.

HAL_ADC_IIDX_MEM1_RESULT_LOADED 

ADC12 interrupt index for MEM1 result loaded interrupt.

HAL_ADC_IIDX_MEM2_RESULT_LOADED 

ADC12 interrupt index for MEM2 result loaded interrupt.

HAL_ADC_IIDX_MEM3_RESULT_LOADED 

ADC12 interrupt index for MEM3 result loaded interrupt.

HAL_ADC_IIDX_MEM4_RESULT_LOADED 

ADC12 interrupt index for MEM4 result loaded interrupt.

HAL_ADC_IIDX_MEM5_RESULT_LOADED 

ADC12 interrupt index for MEM5 result loaded interrupt.

HAL_ADC_IIDX_MEM6_RESULT_LOADED 

ADC12 interrupt index for MEM6 result loaded interrupt.

HAL_ADC_IIDX_MEM7_RESULT_LOADED 

ADC12 interrupt index for MEM7 result loaded interrupt.

HAL_ADC_IIDX_MEM8_RESULT_LOADED 

ADC12 interrupt index for MEM8 result loaded interrupt.

HAL_ADC_IIDX_MEM9_RESULT_LOADED 

ADC12 interrupt index for MEM9 result loaded interrupt.

HAL_ADC_IIDX_MEM10_RESULT_LOADED 

ADC12 interrupt index for MEM10 result loaded interrupt.

HAL_ADC_IIDX_MEM11_RESULT_LOADED 

ADC12 interrupt index for MEM10 result loaded interrupt.

Function Documentation

§ HAL_init()

void HAL_init ( )

§ HAL_readGPIOPin()

bool HAL_readGPIOPin ( HAL_GPIO_IN  pin)

Reads a GPIOpin.

Parameters
[in]pinGPIOpin to be read
Returns
Status of pin

Referenced by Halltrap_PWMUpdate().

§ HAL_writeGPIOPin()

void HAL_writeGPIOPin ( HAL_GPIO_OUT  pin,
HAL_GPIO_STATE  value 
)

§ HAL_setDeadband()

void HAL_setDeadband ( HAL_PWM  pwm,
uint16_t  deadband 
)

Sets deadband for timer.

Parameters
[in]pwmPWM timer
[in]deadbandDelay time in nanoseconds

References HAL_Timer_Instance_::deadBand, and HAL_PWM_TIMER_FREQ_MHZ.

Referenced by Halltrap_setDeadband().

§ HAL_setPWMFreq()

void HAL_setPWMFreq ( HAL_PWM  pwm,
uint32_t  PWMFreq 
)

Sets PWMfreq for all timers.

Parameters
[in]pwmPWM timer
[in]PWMFreqPWM frequency of the motor phase

References HAL_Timer_Instance_::gptimer, and HAL_PWM_TIMER_FREQ_MHZ.

Referenced by Halltrap_setPWMFreq().

§ HAL_writeSPI16()

void HAL_writeSPI16 ( HAL_SPI_CHAN  chan,
HAL_SPI_CS  cs,
uint16_t  data 
)

Write data to spi.

Parameters
[in]chanThe SPI channel
[in]csChannel select pin
[in]dataData to write

Referenced by DRV8316_init().

§ HAL_readSPI16()

uint16_t HAL_readSPI16 ( HAL_SPI_CHAN  chan,
HAL_SPI_CS  cs 
)

Read data from spi.

Parameters
[in]chanThe SPI channel
[in]csChannel select pin
Returns
Data recieved

Referenced by DRV8316_init().

§ HAL_setADCRefVoltage()

void HAL_setADCRefVoltage ( HAL_ADC_CHAN  chan,
uint16_t  voltage_mV 
)

Set ADC reference voltage.

Parameters
[in]chanThe ADC channel
[in]voltage_mVReference voltage

References HAL_ADC_instance_::refVoltagemV.

§ HAL_getmvFromADC()

uint32_t HAL_getmvFromADC ( HAL_ADC_CHAN  chan)

Get milli volts from ADC.

Parameters
[in]chanThe ADC channel
Returns
The ADC value in milli volts

References MAX_ADC_VALUE, HAL_ADC_instance_::refVoltagemV, and HAL_ADC_instance_::value.

Referenced by HAL_getIQ20VoltageFromADC().

§ HAL_getIQ20VoltageFromADC()

_iq20 HAL_getIQ20VoltageFromADC ( HAL_ADC_CHAN  chan)

§ HAL_processADCIRQ()

HAL_ADC_IIDX HAL_processADCIRQ ( ADC12_Regs *  adcInst)

Read ADC values from results.

Parameters
[in]adcInstADC instances
Returns
Return ADC IRQ Index

References HAL_ADC_CHAN_MAX, and HAL_ADC_instance_::value.

§ HAL_enableADCInterrupt()

void HAL_enableADCInterrupt ( HAL_ADC_CHAN  chan)

Enables ADC interrupts.

Parameters
[in]chanThe ADC channel

References HAL_ADC_instance_::IRQn.

Referenced by DRV8300_init(), drv8311_init(), DRV8316_init(), drv8317_init(), DRV8323_init(), drv8328_init(), DRV8329_init(), and DRV8353_init().

§ HAL_enableGPIOInterrupt()

void HAL_enableGPIOInterrupt ( HAL_GPIO_IN  pin)

Enables GPIO interrupts.

Parameters
[in]pinThe GPIO pin

References HAL_GPIO_Instance_::IRQn.

Referenced by Halltrap_Init().

§ HAL_enablePWMInterrupt()

void HAL_enablePWMInterrupt ( HAL_PWM  pwm)

Enables PWM interrupts.

Parameters
[in]pwmThe PWM channel

References HAL_Timer_Instance_::IRQn.

§ HAL_enableCaptureInterrupt()

void HAL_enableCaptureInterrupt ( HAL_CAPTURE_TIMER  capture)

Enables capture interrupts.

Parameters
[in]captureThe capture channel

References HAL_Timer_Instance_::IRQn.

Referenced by Halltrap_Init().

§ HAL_setADCVRefVDDA()

void HAL_setADCVRefVDDA ( HAL_ADC_CHAN  chan)

§ HAL_setADCVRefInternal()

void HAL_setADCVRefInternal ( HAL_ADC_CHAN  chan,
HAL_ADC_INT_VREF  internalVRef 
)

§ HAL_setADCVRefExternal()

void HAL_setADCVRefExternal ( HAL_ADC_CHAN  chan,
uint16_t  externalVRef 
)

Set ADC voltage reference to external reference.

Parameters
[in]chanThe ADC channel
[in]externalVRefExternal reference voltage

References HAL_ADC_instance_::inst, HAL_ADC_instance_::memIdx, and HAL_ADC_instance_::refVoltagemV.

Referenced by DRV8300_ADCVRefSel(), drv8311_ADCVRefSel(), DRV8316_ADCVRefSel(), drv8317_ADCVRefSel(), DRV8323_ADCVRefSel(), drv8328_ADCVRefSel(), DRV8329_ADCVRefSel(), DRV8353_ADCVRefSel(), and HAL_ADCVRefSel().

§ HAL_getTimerFaultStatus()

bool HAL_getTimerFaultStatus ( HAL_FAULT_INPUT  fault)

Read the PWM timer fault bit.

Parameters
[in]faultThe fault input
Returns
The fault status

§ HAL_getCaptureFrequency()

uint32_t HAL_getCaptureFrequency ( HAL_CAPTURE_TIMER  capture)

Calculates the capture frequency.

Parameters
[in]captureThe capture channel
Returns
The capture frequency

References HAL_Timer_Instance_::ccIndex, HAL_Timer_Instance_::gptimer, and HAL_CAPTURE_TIMER_FREQ.

Referenced by Halltrap_calculateMotorSpeed().

§ HAL_ADCVRefSel()

void HAL_ADCVRefSel ( HAL_ADC_VREF  adcRef,
HAL_ADC_CHAN  chan,
HAL_ADC_INT_VREF  internalVRef,
uint16_t  externalVRef 
)

updates the adc voltage reference

Parameters
[in]adcRefADC voltage reference
[in]chanThe ADC channel name
[in]internalVRefInternal reference voltage
[in]externalVRefExternal reference voltage

References HAL_ADC_VREF_EXTERNAL, HAL_ADC_VREF_INTERNAL, HAL_ADC_VREF_VDDA, HAL_setADCVRefExternal(), HAL_setADCVRefInternal(), and HAL_setADCVRefVDDA().

§ HAL_delayMicroSeconds()

__STATIC_INLINE void HAL_delayMicroSeconds ( uint32_t  microSeconds)

Delays for specific time in microseconds.

Parameters
[in]microSecondsDelayed time in microseconds

References HAL_SYSTEM_FREQ_MHZ.

Referenced by drv8311_setnSleep(), DRV8316_setnSleep(), drv8317_setnSleep(), DRV8323_setnSleep(), drv8328_setnSleep(), DRV8329_setnSleep(), DRV8353_setnSleep(), and Halltrap_changeMotorDirection().

§ HAL_updatePWM()

__STATIC_INLINE void HAL_updatePWM ( const HAL_PWM  posPhase,
const HAL_PWM  gndPhase,
const HAL_PWM  opnPhase,
const uint16_t  PWMDuty 
)

Writes the pwm to the pinouts.

Parameters
[in]posPhasephase whose output should be pwm
[in]gndPhasephase whose output should be ground
[in]opnPhasephase whose output should be open
[in]PWMDutydutycycle of the pwm in percentage

References HAL_Timer_Instance_::ccCompIndex, HAL_Timer_Instance_::ccIndex, HAL_Timer_Instance_::deadBand, and HAL_Timer_Instance_::gptimer.

Referenced by Halltrap_Init().

§ HAL_PWMOutputLow()

__STATIC_INLINE void HAL_PWMOutputLow ( const HAL_PWM  gndPhase_1,
const HAL_PWM  gndPhase_2,
const HAL_PWM  gndPhase_3 
)

Set all PWM outputs low.

Parameters
[in]gndPhase_1phase whose output should be open
[in]gndPhase_2phase whose output should be open
[in]gndPhase_3phase whose output should be open

References HAL_Timer_Instance_::ccCompIndex, HAL_Timer_Instance_::ccIndex, and HAL_Timer_Instance_::gptimer.

Referenced by Halltrap_changeMotorDirection(), Halltrap_disablePWM(), and Halltrap_stopMotor().

§ HAL_PWMOutputHigh()

__STATIC_INLINE void HAL_PWMOutputHigh ( const HAL_PWM  gndPhase_1,
const HAL_PWM  gndPhase_2,
const HAL_PWM  gndPhase_3 
)

Set complementary PWM outputs high.

Parameters
[in]gndPhase_1phase whose output should be grounded
[in]gndPhase_2phase whose output should be grounded
[in]gndPhase_3phase whose output should be grounded

References HAL_Timer_Instance_::ccCompIndex, HAL_Timer_Instance_::ccIndex, and HAL_Timer_Instance_::gptimer.

Referenced by Halltrap_stopMotor().

© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale