AN1905 ST Microelectronics, Inc., AN1905 Datasheet - Page 46
![no-image](/images/no-image-200.jpg)
AN1905
Manufacturer Part Number
AN1905
Description
St7mc Three-phase BLDC Motor Control Software Library
Manufacturer
ST Microelectronics, Inc.
Datasheet
1.AN1905.pdf
(77 pages)
- Current page: 46 of 77
- Download datasheet (2Mb)
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
The ‘BOOL Get_HVBus(void)’ returns a boolean. This function returns ‘TRUE’ if the voltage
of the HVBUS connected to channel AIN1 has reached the threshold level or if the voltage has
not yet returned to the threshold level minus the hysteresis value after an over-voltage detec-
tion.
In order to set the voltage and hysteresis threshold, the ‘HVBUS_THRESHOLD’ and
‘HVBUS_HYSTERIS’ values can be adjusted in the adc.c file.
4.3.3 it_ST7MC.c
This module contains all non-MTC related interrupt service routines. In the stand alone
firmware, the timer B resource is the only one to be used. The output compare capability is
used in order to decrease 2 different time bases, 10ms and 1ms (see ‘Timer.c’ file for the timer
B registers configuration).
Basically, unless equal to 0, variables are decreased by one each timer B output compare in-
terrupt event (every 10ms or 1ms for output compare 1 and 2 respectively). Therefore, a var-
iable ‘VAR’ is loaded with ‘50’ in the main code and decreased by one every 10 ms, and will
reach ‘0’ after 500ms (490 to 500 ms if the initialization of ‘VAR’ is done outside of the interrupt
routine).
Figure 26. Time base Principle: Timer B output compare 1 interrupt every 10ms
For more information regarding the configuration of this peripheral, please refer to the data
sheet of the MCU, ‘16-bit timer’ section.
46/77
Clear Status flag, refresh timer B output compare registers,
and update variables used for timing purpose
int
10 ms
Main routine:
int
VAR = 50
int
VAR = 49
int
VAR = 48
int
VAR = 47
Related parts for AN1905
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![AN177](/images/no-image3.png)
Part Number:
Description:
An Overview og the Phase Locked Loop
Manufacturer:
Philips
Datasheet:
![AN1268](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
AN OVERVIEW OF THE LPC FLASH INTERFACE
Manufacturer:
STMicroelectronics
![AN1315](/images/no-image3.png)
Part Number:
Description:
An Evaluation System Interfacing the MPX2000 Series Pressure Sensors to a Microprocessor
Manufacturer:
Motorola / Freescale Semiconductor
![AN1998](/images/no-image3.png)
Part Number:
Description:
An FM-IF system for DECT and other high speed GFSK applications
Manufacturer:
Philips Semiconductors / NXP Semiconductors
![AN2124](/images/no-image3.png)
Part Number:
Description:
An 8 x 8 Discrete Cosine Transform on the StarCore SC140/SC1400 Cores
Manufacturer:
Freescale Semiconductor / Motorola
![AN2428](/images/no-image3.png)
Part Number:
Description:
An Overview of the HCS12 ATD Module
Manufacturer:
Freescale Semiconductor / Motorola
![AN2708](/images/no-image3.png)
Part Number:
Description:
An Introduction to the External Bus Interface on the HCS12X
Manufacturer:
Freescale Semiconductor / Motorola
![AN2783](/images/no-image3.png)
Part Number:
Description:
An RF Data Link Using Tango3 and Romeo2 RF Modules
Manufacturer:
Freescale Semiconductor / Motorola
![STP22NE10L](/images/no-image3.png)
Part Number:
Description:
N-channel 55V - 0.07 Ohm - 22A StripFET Power MOSFET
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![STP32N06L](/images/no-image3.png)
Part Number:
Description:
Old PRODUCT: Not Suitable For Design-in
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![2N4014](/images/no-image3.png)
Part Number:
Description:
High-voltage, High Current Switch
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![L6000](/images/no-image3.png)
Part Number:
Description:
Single Chip Read & Write Channel
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA10-400GP](/images/no-image3.png)
Part Number:
Description:
10A Triacs
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA20-600BW](/images/no-image3.png)
Part Number:
Description:
20A Triacs
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA41-700B](/images/no-image3.png)
Part Number:
Description:
-
Manufacturer:
ST Microelectronics, Inc.
Datasheet: