Showing preview only (4,210K chars total). Download the full file or copy to clipboard to get everything.
Repository: pekkaroi/bldc-drive
Branch: master
Commit: eff75760298f
Files: 138
Total size: 4.0 MB
Directory structure:
gitextract_di5jfrul/
├── .gitignore
├── LICENSE
├── README.md
├── firmware/
│ ├── .cproject
│ ├── .project
│ ├── include/
│ │ └── stm32f10x_conf.h
│ ├── ldscripts/
│ │ ├── libs.ld
│ │ ├── mem.ld
│ │ └── sections.ld
│ ├── src/
│ │ ├── adc.c
│ │ ├── adc.h
│ │ ├── configuration.c
│ │ ├── configuration.h
│ │ ├── eeprom.c
│ │ ├── eeprom.h
│ │ ├── encoder.c
│ │ ├── encoder.h
│ │ ├── hall.c
│ │ ├── hall.h
│ │ ├── input.c
│ │ ├── input.h
│ │ ├── main.c
│ │ ├── pid.c
│ │ ├── pid.h
│ │ ├── pwm.c
│ │ ├── pwm.h
│ │ ├── usart.c
│ │ ├── usart.h
│ │ ├── utils.c
│ │ └── utils.h
│ └── system/
│ ├── include/
│ │ ├── arm/
│ │ │ └── semihosting.h
│ │ ├── cmsis/
│ │ │ ├── README_CMSIS.txt
│ │ │ ├── README_DEVICE.txt
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_const_structs.h
│ │ │ ├── arm_math.h
│ │ │ ├── cmsis_device.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm0plus.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ ├── core_cmInstr.h
│ │ │ ├── core_sc000.h
│ │ │ ├── core_sc300.h
│ │ │ ├── stm32f10x.h
│ │ │ └── system_stm32f10x.h
│ │ ├── cortexm/
│ │ │ └── ExceptionHandlers.h
│ │ ├── diag/
│ │ │ └── Trace.h
│ │ └── stm32f1-stdperiph/
│ │ ├── README_STDPERIPH.txt
│ │ ├── misc.h
│ │ ├── stm32f10x_adc.h
│ │ ├── stm32f10x_bkp.h
│ │ ├── stm32f10x_can.h
│ │ ├── stm32f10x_cec.h
│ │ ├── stm32f10x_crc.h
│ │ ├── stm32f10x_dac.h
│ │ ├── stm32f10x_dbgmcu.h
│ │ ├── stm32f10x_dma.h
│ │ ├── stm32f10x_exti.h
│ │ ├── stm32f10x_flash.h
│ │ ├── stm32f10x_fsmc.h
│ │ ├── stm32f10x_gpio.h
│ │ ├── stm32f10x_i2c.h
│ │ ├── stm32f10x_iwdg.h
│ │ ├── stm32f10x_pwr.h
│ │ ├── stm32f10x_rcc.h
│ │ ├── stm32f10x_rtc.h
│ │ ├── stm32f10x_sdio.h
│ │ ├── stm32f10x_spi.h
│ │ ├── stm32f10x_tim.h
│ │ ├── stm32f10x_usart.h
│ │ └── stm32f10x_wwdg.h
│ └── src/
│ ├── cmsis/
│ │ ├── README_DEVICE.txt
│ │ ├── system_stm32f10x.c
│ │ └── vectors_stm32f10x.c
│ ├── cortexm/
│ │ ├── _initialize_hardware.c
│ │ ├── _reset_hardware.c
│ │ └── exception_handlers.c
│ ├── diag/
│ │ ├── Trace.c
│ │ └── trace_impl.c
│ ├── newlib/
│ │ ├── README.txt
│ │ ├── _cxx.cpp
│ │ ├── _exit.c
│ │ ├── _sbrk.c
│ │ ├── _startup.c
│ │ ├── _syscalls.c
│ │ ├── _write.c
│ │ └── assert.c
│ └── stm32f1-stdperiph/
│ ├── README_STDPERIPH.txt
│ ├── misc.c
│ ├── stm32f10x_adc.c
│ ├── stm32f10x_bkp.c
│ ├── stm32f10x_can.c
│ ├── stm32f10x_cec.c
│ ├── stm32f10x_crc.c
│ ├── stm32f10x_dac.c
│ ├── stm32f10x_dbgmcu.c
│ ├── stm32f10x_dma.c
│ ├── stm32f10x_exti.c
│ ├── stm32f10x_flash.c
│ ├── stm32f10x_fsmc.c
│ ├── stm32f10x_gpio.c
│ ├── stm32f10x_i2c.c
│ ├── stm32f10x_iwdg.c
│ ├── stm32f10x_pwr.c
│ ├── stm32f10x_rcc.c
│ ├── stm32f10x_rtc.c
│ ├── stm32f10x_sdio.c
│ ├── stm32f10x_spi.c
│ ├── stm32f10x_tim.c
│ ├── stm32f10x_usart.c
│ └── stm32f10x_wwdg.c
├── gui/
│ ├── ServoGui.py
│ ├── __init__.py
│ └── servogui.nja
└── hardware/
├── bldc_control_v2/
│ ├── bldc_control_ver2.kicad_pcb
│ ├── bldc_control_ver2.net
│ ├── bldc_control_ver2.pro
│ └── bldc_control_ver2.sch
├── bldc_control_v3/
│ ├── bldc_control_ver3.kicad_pcb
│ ├── bldc_control_ver3.net
│ ├── bldc_control_ver3.pro
│ └── bldc_control_ver3.sch
├── bldc_drive_v2/
│ ├── Alu_casing.kicad_pcb
│ ├── Alu_casing.pro
│ ├── bldc_drive.kicad_pcb
│ ├── bldc_drive.net
│ ├── bldc_drive.pro
│ └── bldc_drive.sch
└── libraries/
├── 6n137.bck
├── 6n137.dcm
├── 6n137.lib
├── INA270.lib
├── custom_7805.dcm
├── custom_7805.lib
└── vias.pretty/
└── Via-0.6mm.kicad_mod
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Object files
*.o
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
.settings/
Debug/
output/
_autosave*
# Eclipse Files
./Debug/
./Release/
.settings
# KiCAD Backup and temp files
*.bak
*-cache.lib
*.kicad_pcb-bak
*.csv
*.xml
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: README.md
================================================
# bldc-drive
This is a project developing a simple BLDC servo controller. It is based on an STM32F103 microcontroller.
Some parts, especially the PID control loop is based on development done by user mcm_xyz in cnczone.com forum. Thank you! Check the thread http://www.cnczone.com/forums/open-source-controller-boards/283428-cnc.html
## Disclaimer
This software and hardware is provided "AS IS", WITHOUT ANY WARRANTY. The software is released under GPL v2. Authors accept no liability for any harm or loss resulting from use of this hardware or software.
## Authors & Contributors
* original Software by mcm_xyz from cnczone
* first Version of Hardware&Software in a Git-repo from pekkaroi via https://github.com/pekkaroi
* Schematic-additions and fork by Philipp Hörauf via https://github.com/Virtex7
## Firmware
Firmware is a work-in-progress (and will be for a while :), however following features are included:
* Trapezoidal BLDC commutation using either HALL sensors or quadrature encoder.
* Step+Dir input interface with PID position control loop.
* PWM+Dir input interface in velocity mode.
* USART communitacation for configuration. Configuration settings saved to flash memory.
* TODO: Motor Test Mode to simply activate a Motor with a fixed frequency, no encoder needed
### Update 1st May 2016
Some updates to the firmware.
* ADC current limiting implemented. Appears to work OK
* I created a quick and ugly Python gui for tuning
* Updated the PID loop to have feedfoward coefficients FF1 and FF2 (like LinuxCNC). This means that the PID output can be adjusted by the requested speed and the requested acceleration. This made the PID tuning a lot easier for me at least, I'm able to get a motor to follow the requested position very well also during acceleration and during constant drive.
## Hardware:
First prototype hardware is built and it is working well. However, there are couple of known issues:
* 6n137 optocoupler is not officially supporting 3.3V supply voltage which is used in the board. In reality they seem to work, but the optocoupler should be changed or additional levelshifting circuitry added on next revision. Also, the optocoupler input circuit supports only push-pull-type encoder output. Many encoders seem to have open drain output. :(
* Few connectors in the layout missed solder stop openings. They were bit painfull to solder. :)
* The current amplifier INA27x connection is wrong. The IN+ and IN- should be swapped.
### STATUS QUO:
Second hardware revision with the above findings fixed is published. There are no known issues, two servo drives are succesfully driving my CNC router. Pics and videos to come..
### HARDWARE TODOs:
* verify all part-values into the schematic
================================================
FILE: firmware/.cproject
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.207181108" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1100661713" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.debug" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.2065714837" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.793387801" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1262319042" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1666718696" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.134073882" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.max" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1902768746" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.812317975" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.734711222" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.695513662" name="Assume freestanding environment (-ffreestanding)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.159752236" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1010597890" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.505385779" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1395947140" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1941147849" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1638118821" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1293418532" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.650205718" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.411840676" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1025541740" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.39803095" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1275252913" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.312439973" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1937417617" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1296496957" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1150821488" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/BLDC_ver1}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.25885273" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1076207584" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1843634388" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.808474674" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1685789137" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
<listOptionValue builtIn="false" value="TRACE"/>
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.296257140" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1786701601" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1410535020" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/bldc_drive/system/STM32_USB-FS-Device_Driver/inc}""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.55945664" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
<listOptionValue builtIn="false" value="TRACE"/>
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1815242872" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.194741531" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.938338344" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.1218988015" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.1121929197" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit.1520702911" name="Do not use _cxa_atexit() (-fno-use-cxa-atexit)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics.1546134586" name="Do not use thread-safe statics (-fno-threadsafe-statics)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.730566938" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="USE_FULL_ASSERT"/>
<listOptionValue builtIn="false" value="TRACE"/>
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.935300792" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1457858998" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1601887907" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.2099717793" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" valueType="libPaths">
<listOptionValue builtIn="false" value=""../ldscripts""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.1102260635" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="mem.ld"/>
<listOptionValue builtIn="false" value="libs.ld"/>
<listOptionValue builtIn="false" value="sections.ld"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart.1927875645" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.153809215" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value=" --specs=nano.specs" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.1682402450" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.333302770" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1407057432" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.364959683" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" valueType="libPaths">
<listOptionValue builtIn="false" value=""../ldscripts""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.118133242" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="mem.ld"/>
<listOptionValue builtIn="false" value="libs.ld"/>
<listOptionValue builtIn="false" value="sections.ld"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.1053407748" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1380277598" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value=" --specs=nano.specs" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.1452832492" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1527530008" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1082444465" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1951288306" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.309925479" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.363757718" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.1360352155" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1142607769" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.373745365" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.759181590" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.272469812" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="src/stm32f1-stdperiph/stm32f10x_bkp.c|src/stm32f1-stdperiph/stm32f10x_can.c|src/stm32f1-stdperiph/stm32f10x_cec.c|src/stm32f1-stdperiph/stm32f10x_crc.c|src/stm32f1-stdperiph/stm32f10x_dac.c|src/stm32f1-stdperiph/stm32f10x_dbgmcu.c|src/stm32f1-stdperiph/stm32f10x_fsmc.c|src/stm32f1-stdperiph/stm32f10x_i2c.c|src/stm32f1-stdperiph/stm32f10x_iwdg.c|src/stm32f1-stdperiph/stm32f10x_pwr.c|src/stm32f1-stdperiph/stm32f10x_rtc.c|src/stm32f1-stdperiph/stm32f10x_sdio.c|src/stm32f1-stdperiph/stm32f10x_spi.c|src/stm32f1-stdperiph/stm32f10x_wwdg.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="system"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349" name="Release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.1258297581" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.165203776" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.935007838" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.145392199" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1563059149" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.360614799" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1602170671" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.470233354" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.845138059" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.1726146947" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.1117558259" name="Assume freestanding environment (-ffreestanding)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.650975140" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.94077478" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.2105361264" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1046988448" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.2050829493" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.344842289" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1485131244" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.722164352" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.552314227" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1857982866" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.242841462" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1209771726" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1407368619" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.409462461" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.675067511" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1299103396" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/BLDC_ver1}/Release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.784794267" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1715929388" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.534266619" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.300410155" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.822663657" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.487116385" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.215472594" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.607754723" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/bldc_drive/system/include/stm32_usb_fs}""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1843438823" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1562183760" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.423451241" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.582558434" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""../include""/>
<listOptionValue builtIn="false" value=""../system/include""/>
<listOptionValue builtIn="false" value=""../system/include/cmsis""/>
<listOptionValue builtIn="false" value=""../system/include/stm32f1-stdperiph""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.999648323" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.855256344" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit.2130738093" name="Do not use _cxa_atexit() (-fno-use-cxa-atexit)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nousecxaatexit" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics.923441525" name="Do not use thread-safe statics (-fno-threadsafe-statics)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nothreadsafestatics" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.492890167" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="OS_USE_TRACE_ITM"/>
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
<listOptionValue builtIn="false" value="HSE_VALUE=8000000"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.198709059" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.443895651" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.161123770" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.1047102960" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" valueType="libPaths">
<listOptionValue builtIn="false" value=""../ldscripts""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.520905345" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="mem.ld"/>
<listOptionValue builtIn="false" value="libs.ld"/>
<listOptionValue builtIn="false" value="sections.ld"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart.2047451625" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.nostart" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.815460734" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value=" --specs=nano.specs" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.913092517" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1209979636" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.815408519" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.188530633" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" valueType="libPaths">
<listOptionValue builtIn="false" value=""../ldscripts""/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.2017900060" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="mem.ld"/>
<listOptionValue builtIn="false" value="libs.ld"/>
<listOptionValue builtIn="false" value="sections.ld"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.1116131073" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.496743648" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value=" --specs=nano.specs" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.184990455" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1215374082" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.12179769" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1022829925" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.867048548" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1522882317" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.644034865" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.266238027" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1602599244" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.80463465" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1832338540" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="src/stm32f1-stdperiph/stm32f10x_bkp.c|src/stm32f1-stdperiph/stm32f10x_can.c|src/stm32f1-stdperiph/stm32f10x_cec.c|src/stm32f1-stdperiph/stm32f10x_crc.c|src/stm32f1-stdperiph/stm32f10x_dac.c|src/stm32f1-stdperiph/stm32f10x_dbgmcu.c|src/stm32f1-stdperiph/stm32f10x_fsmc.c|src/stm32f1-stdperiph/stm32f10x_i2c.c|src/stm32f1-stdperiph/stm32f10x_iwdg.c|src/stm32f1-stdperiph/stm32f10x_pwr.c|src/stm32f1-stdperiph/stm32f10x_rtc.c|src/stm32f1-stdperiph/stm32f10x_sdio.c|src/stm32f1-stdperiph/stm32f10x_spi.c|src/stm32f1-stdperiph/stm32f10x_wwdg.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="system"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="BLDC_ver1.ilg.gnuarmeclipse.managedbuild.cross.target.elf.1955113873" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/BLDC_ver1"/>
</configuration>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/BLDC_ver1"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1786701601;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1815242872">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.423451241;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.198709059">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.934943349.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.215472594;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1562183760">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.928689578.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.194741531;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.935300792">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
================================================
FILE: firmware/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bldc_drive</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
</natures>
</projectDescription>
================================================
FILE: firmware/include/stm32f10x_conf.h
================================================
/**
******************************************************************************
* @file Project/STM32F10x_StdPeriph_Template/stm32f10x_conf.h
* @author MCD Application Team
* @version V3.5.0
* @date 08-April-2011
* @brief Library configuration file.
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_CONF_H
#define __STM32F10x_CONF_H
/* Includes ------------------------------------------------------------------*/
/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
#include "stm32f10x_adc.h"
#include "stm32f10x_bkp.h"
#include "stm32f10x_can.h"
#include "stm32f10x_cec.h"
#include "stm32f10x_crc.h"
#include "stm32f10x_dac.h"
#include "stm32f10x_dbgmcu.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_flash.h"
#include "stm32f10x_fsmc.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_i2c.h"
#include "stm32f10x_iwdg.h"
#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_rtc.h"
#include "stm32f10x_sdio.h"
#include "stm32f10x_spi.h"
#include "stm32f10x_tim.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_wwdg.h"
#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Uncomment the line below to expanse the "assert_param" macro in the
Standard Peripheral Library drivers code */
/* #define USE_FULL_ASSERT 1 */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function which reports
* the name of the source file and the source line number of the call
* that failed. If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);
#else
#define assert_param(expr) ((void)0)
#endif /* USE_FULL_ASSERT */
//#define VECT_TAB_SRAM
#endif /* __STM32F10x_CONF_H */
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
================================================
FILE: firmware/ldscripts/libs.ld
================================================
/*
* Placeholder to list other libraries required by the application.
GROUP(
)
*/
================================================
FILE: firmware/ldscripts/mem.ld
================================================
/*
* Memory Spaces Definitions.
*
* Need modifying for a specific board.
* FLASH.ORIGIN: starting address of flash
* FLASH.LENGTH: length of flash
* RAM.ORIGIN: starting address of RAM bank 0
* RAM.LENGTH: length of RAM bank 0
*
* The values below can be addressed in further linker scripts
* using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
*/
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
}
/*
* For external ram use something like:
RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
*/
================================================
FILE: firmware/ldscripts/sections.ld
================================================
/*
* Default linker script for STM32Fxxx.
*/
/*
* The '__stack' definition is required by crt0, do not remove it.
*/
__stack = ORIGIN(RAM) + LENGTH(RAM);
_estack = __stack; /* STM specific definition */
/*
* Default stack sizes.
* These are used by the startup in order to allocate stacks
* for the different modes.
*/
__Main_Stack_Size = 1024 ;
PROVIDE ( _Main_Stack_Size = __Main_Stack_Size ) ;
__Main_Stack_Limit = __stack - __Main_Stack_Size ;
/*"PROVIDE" allows to easily override these values from an object file or the command line. */
PROVIDE ( _Main_Stack_Limit = __Main_Stack_Limit ) ;
/*
* There will be a link error if there is not this amount of
* RAM free at the end.
*/
_Minimum_Stack_Size = 256 ;
/*
* Default heap definitions.
* The heap start immediately after the last statically allocated
* .sbss/.noinit section, and extends up to the main stack limit.
*/
PROVIDE ( _Heap_Begin = _end_noinit ) ;
PROVIDE ( _Heap_Limit = __stack - __Main_Stack_Size ) ;
/*
* The entry point is informative, for debuggers and simulators,
* since the Cortex-M vector points to it anyway.
*/
ENTRY(_start)
/* Sections Definitions */
SECTIONS
{
/*
* For Cortex-M devices, the beginning of the startup code is stored in
* the .isr_vector section, which goes to FLASH
*/
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Interrupt vectors */
KEEP(*(.cfmconfig)) /* Freescale configuration words */
/*
* This section is here for convenience, to store the
* startup code at the beginning of the flash area, hoping that
* this will increase the readability of the listing.
*/
*(.after_vectors .after_vectors.*) /* Startup code and ISR */
. = ALIGN(4);
} >FLASH
.inits :
{
. = ALIGN(4);
/*
* These are the old initialisation sections, intended to contain
* naked code, with the prologue/epilogue added by crti.o/crtn.o
* when linking with startup files. The standalone startup code
* currently does not run these, better use the init arrays below.
*/
KEEP(*(.init))
KEEP(*(.fini))
. = ALIGN(4);
/*
* The preinit code, i.e. an array of pointers to initialisation
* functions to be performed before constructors.
*/
PROVIDE_HIDDEN (__preinit_array_start = .);
/*
* Used to run the SystemInit() before anything else.
*/
KEEP(*(.preinit_array_sysinit .preinit_array_sysinit.*))
/*
* Used for other platform inits.
*/
KEEP(*(.preinit_array_platform .preinit_array_platform.*))
/*
* The application inits. If you need to enforce some order in
* execution, create new sections, as before.
*/
KEEP(*(.preinit_array .preinit_array.*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/*
* The init code, i.e. an array of pointers to static constructors.
*/
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/*
* The fini code, i.e. an array of pointers to static destructors.
*/
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH
/*
* For some STRx devices, the beginning of the startup code
* is stored in the .flashtext section, which goes to FLASH.
*/
.flashtext :
{
. = ALIGN(4);
*(.flashtext .flashtext.*) /* Startup code */
. = ALIGN(4);
} >FLASH
/*
* The program code is stored in the .text section,
* which goes to FLASH.
*/
.text :
{
. = ALIGN(4);
*(.text .text.*) /* all remaining code */
*(.rodata .rodata.*) /* read-only data (constants) */
*(vtable) /* C++ virtual tables */
KEEP(*(.eh_frame*))
/*
* Stub sections generated by the linker, to glue together
* ARM and Thumb code. .glue_7 is used for ARM code calling
* Thumb code, and .glue_7t is used for Thumb code calling
* ARM code. Apparently always generated by the linker, for some
* architectures, so better leave them here.
*/
*(.glue_7)
*(.glue_7t)
} >FLASH
/* ARM magic sections */
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
. = ALIGN(4);
_etext = .;
__etext = .;
/*
* This address is used by the startup code to
* initialise the .data section.
*/
_sidata = _etext;
/* MEMORY_ARRAY */
/*
.ROarraySection :
{
*(.ROarraySection .ROarraySection.*)
} >MEMORY_ARRAY
*/
/*
* The initialised data section.
* The program executes knowing that the data is in the RAM
* but the loader puts the initial values in the FLASH (inidata).
* It is one task of the startup to copy the initial values from
* FLASH to RAM.
*/
.data : AT ( _sidata )
{
. = ALIGN(4);
/* This is used by the startup code to initialise the .data section */
_sdata = . ; /* STM specific definition */
__data_start__ = . ;
*(.data_begin .data_begin.*)
*(.data .data.*)
*(.data_end .data_end.*)
. = ALIGN(4);
/* This is used by the startup code to initialise the .data section */
_edata = . ; /* STM specific definition */
__data_end__ = . ;
} >RAM
/*
* The uninitialised data section. NOLOAD is used to avoid
* the "section `.bss' type changed to PROGBITS" warning
*/
.bss (NOLOAD) :
{
. = ALIGN(4);
__bss_start__ = .; /* standard newlib definition */
_sbss = .; /* STM specific definition */
*(.bss_begin .bss_begin.*)
*(.bss .bss.*)
*(COMMON)
*(.bss_end .bss_end.*)
. = ALIGN(4);
__bss_end__ = .; /* standard newlib definition */
_ebss = . ; /* STM specific definition */
} >RAM
.noinit (NOLOAD) :
{
. = ALIGN(4);
_noinit = .;
*(.noinit .noinit.*)
. = ALIGN(4) ;
_end_noinit = .;
} > RAM
/* Mandatory to be word aligned, _sbrk assumes this */
PROVIDE ( end = _end_noinit ); /* was _ebss */
PROVIDE ( _end = _end_noinit );
PROVIDE ( __end = _end_noinit );
PROVIDE ( __end__ = _end_noinit );
/*
* Used for validation only, do not allocate anything here!
*
* This is just to check that there is enough RAM left for the Main
* stack. It should generate an error if it's full.
*/
._check_stack :
{
. = ALIGN(4);
. = . + _Minimum_Stack_Size ;
. = ALIGN(4);
} >RAM
.bss_CCMRAM : ALIGN(4)
{
*(.bss.CCMRAM .bss.CCMRAM.*)
} > CCMRAM
/*
* The FLASH Bank1.
* The C or assembly source must explicitly place the code
* or data there using the "section" attribute.
*/
.b1text :
{
*(.b1text) /* remaining code */
*(.b1rodata) /* read-only data (constants) */
*(.b1rodata.*)
} >FLASHB1
/*
* The EXTMEM.
* The C or assembly source must explicitly place the code or data there
* using the "section" attribute.
*/
/* EXTMEM Bank0 */
.eb0text :
{
*(.eb0text) /* remaining code */
*(.eb0rodata) /* read-only data (constants) */
*(.eb0rodata.*)
} >EXTMEMB0
/* EXTMEM Bank1 */
.eb1text :
{
*(.eb1text) /* remaining code */
*(.eb1rodata) /* read-only data (constants) */
*(.eb1rodata.*)
} >EXTMEMB1
/* EXTMEM Bank2 */
.eb2text :
{
*(.eb2text) /* remaining code */
*(.eb2rodata) /* read-only data (constants) */
*(.eb2rodata.*)
} >EXTMEMB2
/* EXTMEM Bank0 */
.eb3text :
{
*(.eb3text) /* remaining code */
*(.eb3rodata) /* read-only data (constants) */
*(.eb3rodata.*)
} >EXTMEMB3
/* After that there are only debugging sections. */
/* This can remove the debugging information from the standard libraries */
/*
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
*/
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/*
* DWARF debug sections.
* Symbols in the DWARF debugging sections are relative to the beginning
* of the section so we begin them at 0.
*/
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
================================================
FILE: firmware/src/adc.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_adc.h>
#include <stm32f10x_dma.h>
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
//#include <>
#include "adc.h"
#include "pwm.h"
volatile uint16_t ADC_value;
volatile uint16_t max_duty;
void initADC()
{
max_duty=MAX_DUTY;
GPIO_InitTypeDef GPIO_InitStructure;
//--Enable ADC1 and GPIOA--
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1 | RCC_APB2Periph_GPIOA, ENABLE);
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; //PA4 = bus measurement
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
GPIO_Init(GPIOA, &GPIO_InitStructure);
ADC_InitTypeDef ADC_InitStructure;
//ADC1 configuration
ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
ADC_InitStructure.ADC_ScanConvMode = DISABLE;
ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;//!
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfChannel = 1;
//load structure values to control and status registers
ADC_Init(ADC1, &ADC_InitStructure);
ADC_RegularChannelConfig(ADC1, ADC_Channel_4, 1, ADC_SampleTime_41Cycles5);
//Enable ADC1
ADC_Cmd(ADC1, ENABLE);
//enable DMA for ADC
ADC_DMACmd(ADC1, ENABLE);
//Enable ADC1 reset calibration register
ADC_ResetCalibration(ADC1);
//Check the end of ADC1 reset calibration register
while(ADC_GetResetCalibrationStatus(ADC1));
//Start ADC1 calibration
ADC_StartCalibration(ADC1);
//Check the end of ADC1 calibration
while(ADC_GetCalibrationStatus(ADC1));
//enable DMA1 clock
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
//create DMA structure
DMA_InitTypeDef DMA_InitStructure;
//reset DMA1 channe1 to default values;
DMA_DeInit(DMA1_Channel1);
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
DMA_InitStructure.DMA_BufferSize = 1;
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)&ADC1->DR;
DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)&ADC_value;
//send values to DMA registers
DMA_Init(DMA1_Channel1, &DMA_InitStructure);
// Enable DMA1 Channel Transfer Complete interrupt
DMA_ITConfig(DMA1_Channel1, DMA_IT_TC, ENABLE);
DMA_Cmd(DMA1_Channel1, ENABLE); //Enable the DMA1 - Channel1
//Enable DMA1 channel IRQ Channel */
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void ADC1_2_IRQHandler(void) {
if (ADC_GetITStatus(ADC1, ADC_IT_EOC) != RESET)
{
ADC_ClearITPendingBit(ADC1, ADC_IT_EOC);
}
}
void DMA1_Channel1_IRQHandler(void) {
if(DMA_GetITStatus(DMA1_IT_TC1)) {
DMA_ClearITPendingBit(DMA1_IT_GL1);
DMA_Cmd(DMA1_Channel1, ENABLE);
if(ADC_value>s.max_current && max_duty>1)
{
max_duty -= 2;
return;
}
if(ADC_value<=s.max_current && max_duty<MAX_DUTY)
{
max_duty ++;
return;
}
}
}
================================================
FILE: firmware/src/adc.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ADC_H_
#define ADC_H_
extern volatile uint16_t ADC_value;
extern volatile uint16_t max_duty;
void initADC();
#endif /* ADC_H_ */
================================================
FILE: firmware/src/configuration.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "configuration.h"
#include "eeprom.h"
#include "usart.h"
#include <string.h>
#include <stdio.h>
#define EADDR_IS_INITIALIZED 0x0001
#define EADDR_CONFIG_START 0x0002
void writeConfig()
{
FLASH_Unlock();
uint16_t i;
int16_t *ptr = (int16_t *)&s;
for(i=0; i<sizeof(servoConfig)/2;i++)
{
if(EE_WriteVariable(EADDR_CONFIG_START+i, *ptr)!=FLASH_COMPLETE)
{
usart_sendStr("Flash Error\n\r");
}
ptr++;
}
FLASH_Lock();
}
void getConfig()
{
FLASH_Unlock();
uint16_t i;
uint16_t *ptr;
EE_Init();
EE_ReadVariable(EADDR_IS_INITIALIZED,&i);
if(i != 0x5254)
{
//empty or corrupted EEPROM detected: write default config
//EE_Format();
EE_WriteVariable(EADDR_IS_INITIALIZED, 0x5254);
s.commutationMethod = commutationMethod_Encoder;
s.inputMethod = inputMethod_stepDir;
s.encoder_PPR = 2400;
s.encoder_poles = 7;
s.encoder_counts_per_step = 1;
s.invert_dirstepena = 7;
s.max_error = 1000;
s.pid_Kp = 10;
s.pid_Ki = 0;
s.pid_Kd = 0;
s.pid_FF1 = 0;
s.pid_FF2 = 0;
s.pid_deadband = 0;
s.max_current = 1000;
s.usart_baud = 1152;
s.commutation_offset=0;
writeConfig();
return;
}
ptr = (uint16_t *)&s;
for(i=0; i<sizeof(servoConfig)/2;i++)
{
if(EE_ReadVariable(EADDR_CONFIG_START+i, ptr)!=0)
usart_sendStr("Flash Error\n\r");
ptr++;
}
FLASH_Lock();
return;
}
void setConfig(char* param, int16_t value)
{
if (strstr( param, "commutationMethod" ) != NULL)
{
s.commutationMethod = (uint16_t)value;
//writeConfig();
//this is taken into account on next boot
//usart_sendStr("SET OK\n");
}
if (strstr( param, "inputMethod" ) != NULL)
{
s.inputMethod = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "encoder_PPR" ) != NULL)
{
s.encoder_PPR = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "encoder_poles" ) != NULL)
{
s.encoder_poles = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "encoder_counts_per_step" ) != NULL)
{
s.encoder_counts_per_step = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_Kp" ) != NULL)
{
s.pid_Kp = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_Ki" ) != NULL)
{
s.pid_Ki = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_Kd" ) != NULL)
{
s.pid_Kd = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_FF1" ) != NULL)
{
s.pid_FF1 = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_FF2" ) != NULL)
{
s.pid_FF2 = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "pid_deadband" ) != NULL)
{
s.pid_deadband = (int16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "usart_baud" ) != NULL)
{
s.usart_baud = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "max_current" ) != NULL)
{
s.max_current = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "max_error" ) != NULL)
{
s.max_error = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "invert_dirstepena" ) != NULL)
{
s.invert_dirstepena = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
if (strstr( param, "commutation_offset" ) != NULL)
{
s.commutation_offset = (uint16_t)value;
//usart_sendStr("SET OK\n");
}
}
void printConfiguration()
{
char buf[50];
sprintf(buf,"commutationMethod: %d\n",s.commutationMethod);
usart_sendStr(buf);
sprintf(buf,"inputMethod: %d\n",s.inputMethod);
usart_sendStr(buf);
sprintf(buf,"encoder_PPR: %d\n",s.encoder_PPR);
usart_sendStr(buf);
sprintf(buf,"encoder_poles: %d\n",s.encoder_poles);
usart_sendStr(buf);
sprintf(buf,"encoder_counts_per_step: %d\n",s.encoder_counts_per_step);
usart_sendStr(buf);
sprintf(buf,"max_error: %d\n",s.max_error);
usart_sendStr(buf);
sprintf(buf,"invert_dirstepena: %d\n",s.invert_dirstepena);
usart_sendStr(buf);
sprintf(buf,"pid_Kp: %d\n",s.pid_Kp);
usart_sendStr(buf);
sprintf(buf,"pid_Ki: %d\n",s.pid_Ki);
usart_sendStr(buf);
sprintf(buf,"pid_Kd: %d\n",s.pid_Kd);
usart_sendStr(buf);
sprintf(buf,"pid_FF1: %d\n",s.pid_FF1);
usart_sendStr(buf);
sprintf(buf,"pid_FF2: %d\n",s.pid_FF2);
usart_sendStr(buf);
sprintf(buf,"pid_deadband: %d\n",s.pid_deadband);
usart_sendStr(buf);
sprintf(buf,"usart_baud: %d\n",s.usart_baud);
usart_sendStr(buf);
sprintf(buf,"max_current: %d\n",s.max_current);
usart_sendStr(buf);
sprintf(buf,"commutation_offset: %d\n",s.commutation_offset);
usart_sendStr(buf);
}
================================================
FILE: firmware/src/configuration.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef CONFIGURATION_H_
#define CONFIGURATION_H_
#include <stdint.h>
/*
* functionality from sinusoid_drive branch has been merged to master brach 13.2.2017. define SINUSOID_DRIVE to
* enable sinusoid commutation, comment it out to define trapezoidal commutation.
*
*/
#define SINUSOID_DRIVE 1
//PID timer period. Counter runs at 1MHz, so f_pid = 1e6/period. 250=4kHz, 125=8Khz, 63=16kHz..
#define PID_TIM_PERIOD 40
//BLDC_CHOPPER_PERIOD defines the PWM clock frequency. Timer runs at 72MHz (Fcpu), so Fpwm = 72e6/period
//4000 = 18kHz
//2000 = 36kHz
#define BLDC_CHOPPER_PERIOD 2000
#ifndef SINUSOID_DRIVE
#define MAX_DUTY BLDC_CHOPPER_PERIOD-50 //100% duty not allowed to allow recharge of high side gate drivers
#else
#define ZERO_DUTY BLDC_CHOPPER_PERIOD/2
#define MAX_DUTY BLDC_CHOPPER_PERIOD/2-50 //100% duty not allowed to allow recharge of high side gate drivers
#endif
#define BLDC_NOL 7//Non-OverLapping, number of clock cycles
#define BLDC_DELAY 100 //Commutation delay. 1= no delay, 2000=7ms.
#define inputMethod_stepDir 1
#define inputMethod_pwmVelocity 2
#define commutationMethod_HALL 1
#define commutationMethod_Encoder 2
#define is_ena_inverted (s.invert_dirstepena>>0)&1
#define is_step_inverted (s.invert_dirstepena>>1)&1
#define is_dir_inverted (s.invert_dirstepena>>2)&1
typedef struct {
volatile uint16_t inputMethod;
volatile uint16_t commutationMethod;
volatile uint16_t encoder_PPR;
volatile uint16_t encoder_poles;
volatile uint16_t max_error;
volatile uint16_t invert_dirstepena;
volatile int16_t encoder_counts_per_step;
volatile uint16_t max_current;
volatile int16_t pid_Kp;
volatile int16_t pid_Ki;
volatile int16_t pid_Kd;
volatile int16_t pid_FF1;
volatile int16_t pid_FF2;
volatile uint16_t pid_deadband;
volatile int16_t commutation_offset;
volatile uint16_t usart_baud; //baud divided by 100 to fit to 16 bits! for example 115200 => 1152
} servoConfig;
void getConfig();
void setConfig(char* param, int16_t value);
void writeConfig();
void printConfiguration();
#endif /* CONFIGURATION_H_ */
================================================
FILE: firmware/src/eeprom.c
================================================
/**
******************************************************************************
* @file EEPROM_Emulation/src/eeprom.c
* @author MCD Application Team
* @version V3.1.0
* @date 07/27/2009
* @brief This file provides all the EEPROM emulation firmware functions.
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2009 STMicroelectronics</center></h2>
*/
/** @addtogroup EEPROM_Emulation
* @{
*/
/* Includes ------------------------------------------------------------------*/
#include "eeprom.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Global variable used to store variable value in read sequence */
uint16_t DataVar = 0;
/* Virtual address defined by the user: 0xFFFF value is prohibited */
uint16_t VirtAddVarTab[17] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
static FLASH_Status EE_Format(void);
static uint16_t EE_FindValidPage(uint8_t Operation);
static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data);
static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data);
/**
* @brief Restore the pages to a known good state in case of page's status
* corruption after a power loss.
* @param None.
* @retval - Flash error code: on write Flash error
* - FLASH_COMPLETE: on success
*/
uint16_t EE_Init(void)
{
uint16_t PageStatus0 = 6, PageStatus1 = 6;
uint16_t VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0;
int16_t x = -1;
uint16_t FlashStatus;
/* Get Page0 status */
PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
/* Get Page1 status */
PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
/* Check for invalid header states and repair if necessary */
switch (PageStatus0)
{
case ERASED:
if (PageStatus1 == VALID_PAGE) /* Page0 erased, Page1 valid */
{
/* Erase Page0 */
FlashStatus = FLASH_ErasePage(PAGE0_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else if (PageStatus1 == RECEIVE_DATA) /* Page0 erased, Page1 receive */
{
/* Erase Page0 */
FlashStatus = FLASH_ErasePage(PAGE0_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Mark Page1 as valid */
FlashStatus = FLASH_ProgramHalfWord(PAGE1_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else /* First EEPROM access (Page0&1 are erased) or invalid state -> format EEPROM */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
break;
case RECEIVE_DATA:
if (PageStatus1 == VALID_PAGE) /* Page0 receive, Page1 valid */
{
/* Transfer data from Page1 to Page0 */
for (VarIdx = 0; VarIdx < NumbOfVar; VarIdx++)
{
if (( *(__IO uint16_t*)(PAGE0_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
{
x = VarIdx;
}
if (VarIdx != x)
{
/* Read the last variables' updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the Page0 */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != FLASH_COMPLETE)
{
return EepromStatus;
}
}
}
}
/* Mark Page0 as valid */
FlashStatus = FLASH_ProgramHalfWord(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Erase Page1 */
FlashStatus = FLASH_ErasePage(PAGE1_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else if (PageStatus1 == ERASED) /* Page0 receive, Page1 erased */
{
/* Erase Page1 */
FlashStatus = FLASH_ErasePage(PAGE1_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Mark Page0 as valid */
FlashStatus = FLASH_ProgramHalfWord(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else /* Invalid state -> format eeprom */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
break;
case VALID_PAGE:
if (PageStatus1 == VALID_PAGE) /* Invalid state -> format eeprom */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else if (PageStatus1 == ERASED) /* Page0 valid, Page1 erased */
{
/* Erase Page1 */
FlashStatus = FLASH_ErasePage(PAGE1_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
else /* Page0 valid, Page1 receive */
{
/* Transfer data from Page0 to Page1 */
for (VarIdx = 0; VarIdx < NumbOfVar; VarIdx++)
{
if ((*(__IO uint16_t*)(PAGE1_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
{
x = VarIdx;
}
if (VarIdx != x)
{
/* Read the last variables' updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the Page1 */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != FLASH_COMPLETE)
{
return EepromStatus;
}
}
}
}
/* Mark Page1 as valid */
FlashStatus = FLASH_ProgramHalfWord(PAGE1_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Erase Page0 */
FlashStatus = FLASH_ErasePage(PAGE0_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
}
break;
default: /* Any other state -> format eeprom */
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
break;
}
return FLASH_COMPLETE;
}
/**
* @brief Returns the last stored variable data, if found, which correspond to
* the passed virtual address
* @param VirtAddress: Variable virtual address
* @param Data: Global variable contains the read variable value
* @retval Success or error status:
* - 0: if variable was found
* - 1: if the variable was not found
* - NO_VALID_PAGE: if no valid page was found.
*/
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data)
{
uint16_t ValidPage = PAGE0;
uint16_t AddressValue = 0x5555, ReadStatus = 1;
uint32_t Address = 0x08010000, PageStartAddress = 0x08010000;
/* Get active Page for read operation */
ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
/* Check if there is no valid page */
if (ValidPage == NO_VALID_PAGE)
{
return NO_VALID_PAGE;
}
/* Get the valid Page start Address */
PageStartAddress = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
/* Get the valid Page end Address */
Address = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ValidPage) * PAGE_SIZE));
/* Check each active page address starting from end */
while (Address > (PageStartAddress + 2))
{
/* Get the current location content to be compared with virtual address */
AddressValue = (*(__IO uint16_t*)Address);
/* Compare the read address with the virtual address */
if (AddressValue == VirtAddress)
{
/* Get content of Address-2 which is variable value */
*Data = (*(__IO uint16_t*)(Address - 2));
/* In case variable value is read, reset ReadStatus flag */
ReadStatus = 0;
break;
}
else
{
/* Next address location */
Address = Address - 4;
}
}
/* Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) */
return ReadStatus;
}
/**
* @brief Writes/upadtes variable data in EEPROM.
* @param VirtAddress: Variable virtual address
* @param Data: 16 bit data to be written
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data)
{
uint16_t Status = 0;
/* Write the variable virtual address and value in the EEPROM */
Status = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
/* In case the EEPROM active page is full */
if (Status == PAGE_FULL)
{
/* Perform Page transfer */
Status = EE_PageTransfer(VirtAddress, Data);
}
/* Return last operation status */
return Status;
}
/**
* @brief Erases PAGE0 and PAGE1 and writes VALID_PAGE header to PAGE0
* @param None
* @retval Status of the last operation (Flash write or erase) done during
* EEPROM formating
*/
static FLASH_Status EE_Format(void)
{
FLASH_Status FlashStatus = FLASH_COMPLETE;
/* Erase Page0 */
FlashStatus = FLASH_ErasePage(PAGE0_BASE_ADDRESS);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Set Page0 as valid page: Write VALID_PAGE at Page0 base address */
FlashStatus = FLASH_ProgramHalfWord(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Erase Page1 */
FlashStatus = FLASH_ErasePage(PAGE1_BASE_ADDRESS);
/* Return Page1 erase operation status */
return FlashStatus;
}
/**
* @brief Find valid Page for write or read operation
* @param Operation: operation to achieve on the valid page.
* This parameter can be one of the following values:
* @arg READ_FROM_VALID_PAGE: read operation from valid page
* @arg WRITE_IN_VALID_PAGE: write operation from valid page
* @retval Valid page number (PAGE0 or PAGE1) or NO_VALID_PAGE in case
* of no valid page was found
*/
static uint16_t EE_FindValidPage(uint8_t Operation)
{
uint16_t PageStatus0 = 6, PageStatus1 = 6;
/* Get Page0 actual status */
PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
/* Get Page1 actual status */
PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
/* Write or read operation */
switch (Operation)
{
case WRITE_IN_VALID_PAGE: /* ---- Write operation ---- */
if (PageStatus1 == VALID_PAGE)
{
/* Page0 receiving data */
if (PageStatus0 == RECEIVE_DATA)
{
return PAGE0; /* Page0 valid */
}
else
{
return PAGE1; /* Page1 valid */
}
}
else if (PageStatus0 == VALID_PAGE)
{
/* Page1 receiving data */
if (PageStatus1 == RECEIVE_DATA)
{
return PAGE1; /* Page1 valid */
}
else
{
return PAGE0; /* Page0 valid */
}
}
else
{
return NO_VALID_PAGE; /* No valid Page */
}
case READ_FROM_VALID_PAGE: /* ---- Read operation ---- */
if (PageStatus0 == VALID_PAGE)
{
return PAGE0; /* Page0 valid */
}
else if (PageStatus1 == VALID_PAGE)
{
return PAGE1; /* Page1 valid */
}
else
{
return NO_VALID_PAGE ; /* No valid Page */
}
default:
return PAGE0; /* Page0 valid */
}
}
/**
* @brief Verify if active page is full and Writes variable in EEPROM.
* @param VirtAddress: 16 bit virtual address of the variable
* @param Data: 16 bit data to be written as variable value
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data)
{
FLASH_Status FlashStatus = FLASH_COMPLETE;
uint16_t ValidPage = PAGE0;
uint32_t Address = 0x08010000, PageEndAddress = 0x080107FF;
/* Get valid Page for write operation */
ValidPage = EE_FindValidPage(WRITE_IN_VALID_PAGE);
/* Check if there is no valid page */
if (ValidPage == NO_VALID_PAGE)
{
return NO_VALID_PAGE;
}
/* Get the valid Page start Address */
Address = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
/* Get the valid Page end Address */
PageEndAddress = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ValidPage) * PAGE_SIZE));
/* Check each active page address starting from begining */
while (Address < PageEndAddress)
{
/* Verify if Address and Address+2 contents are 0xFFFFFFFF */
if ((*(__IO uint32_t*)Address) == 0xFFFFFFFF)
{
/* Set variable data */
FlashStatus = FLASH_ProgramHalfWord(Address, Data);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Set variable virtual address */
FlashStatus = FLASH_ProgramHalfWord(Address + 2, VirtAddress);
/* Return program operation status */
return FlashStatus;
}
else
{
/* Next address location */
Address = Address + 4;
}
}
/* Return PAGE_FULL in case the valid page is full */
return PAGE_FULL;
}
/**
* @brief Transfers last updated variables data from the full Page to
* an empty one.
* @param VirtAddress: 16 bit virtual address of the variable
* @param Data: 16 bit data to be written as variable value
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data)
{
FLASH_Status FlashStatus = FLASH_COMPLETE;
uint32_t NewPageAddress = 0x080103FF, OldPageAddress = 0x08010000;
uint16_t ValidPage = PAGE0, VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0;
/* Get active Page for read operation */
ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
if (ValidPage == PAGE1) /* Page1 valid */
{
/* New page address where variable will be moved to */
NewPageAddress = PAGE0_BASE_ADDRESS;
/* Old page address where variable will be taken from */
OldPageAddress = PAGE1_BASE_ADDRESS;
}
else if (ValidPage == PAGE0) /* Page0 valid */
{
/* New page address where variable will be moved to */
NewPageAddress = PAGE1_BASE_ADDRESS;
/* Old page address where variable will be taken from */
OldPageAddress = PAGE0_BASE_ADDRESS;
}
else
{
return NO_VALID_PAGE; /* No valid Page */
}
/* Set the new Page status to RECEIVE_DATA status */
FlashStatus = FLASH_ProgramHalfWord(NewPageAddress, RECEIVE_DATA);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Write the variable passed as parameter in the new active page */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != FLASH_COMPLETE)
{
return EepromStatus;
}
/* Transfer process: transfer variables from old to the new active page */
for (VarIdx = 0; VarIdx < NumbOfVar; VarIdx++)
{
if (VirtAddVarTab[VarIdx] != VirtAddress) /* Check each variable except the one passed as parameter */
{
/* Read the other last variable updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the new active page */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != FLASH_COMPLETE)
{
return EepromStatus;
}
}
}
}
/* Erase the old Page: Set old Page status to ERASED status */
FlashStatus = FLASH_ErasePage(OldPageAddress);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Set new Page status to VALID_PAGE status */
FlashStatus = FLASH_ProgramHalfWord(NewPageAddress, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != FLASH_COMPLETE)
{
return FlashStatus;
}
/* Return last operation flash status */
return FlashStatus;
}
/**
* @}
*/
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
================================================
FILE: firmware/src/eeprom.h
================================================
/**
******************************************************************************
* @file EEPROM_Emulation/inc/eeprom.h
* @author MCD Application Team
* @version V3.1.0
* @date 07/27/2009
* @brief This file contains all the functions prototypes for the EEPROM
* emulation firmware library.
******************************************************************************
* @copy
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2009 STMicroelectronics</center></h2>
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __EEPROM_H
#define __EEPROM_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
/* Exported constants --------------------------------------------------------*/
/* Define the STM32F10Xxx Flash page size depending on the used STM32 device */
#if defined (STM32F10X_LD) || defined (STM32F10X_MD)
#define PAGE_SIZE (uint16_t)0x400 /* Page size = 1KByte */
#elif defined (STM32F10X_HD) || defined (STM32F10X_CL)
#define PAGE_SIZE (uint16_t)0x800 /* Page size = 2KByte */
#endif
/* EEPROM start address in Flash */
#define EEPROM_START_ADDRESS ((uint32_t)0x0800F800) /* EEPROM emulation start address:
after 64KByte of used Flash memory */
/* Pages 0 and 1 base and end addresses */
#define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x000))
#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1)))
#define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE))
#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1)))
/* Used Flash pages for EEPROM emulation */
#define PAGE0 ((uint16_t)0x0000)
#define PAGE1 ((uint16_t)0x0001)
/* No valid page define */
#define NO_VALID_PAGE ((uint16_t)0x00AB)
/* Page status definitions */
#define ERASED ((uint16_t)0xFFFF) /* PAGE is empty */
#define RECEIVE_DATA ((uint16_t)0xEEEE) /* PAGE is marked to receive data */
#define VALID_PAGE ((uint16_t)0x0000) /* PAGE containing valid data */
/* Valid pages in read and write defines */
#define READ_FROM_VALID_PAGE ((uint8_t)0x00)
#define WRITE_IN_VALID_PAGE ((uint8_t)0x01)
/* Page full define */
#define PAGE_FULL ((uint8_t)0x80)
/* Variables' number */
#define NumbOfVar ((uint8_t)0x03)
/* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
uint16_t EE_Init(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
#endif /* __EEPROM_H */
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
================================================
FILE: firmware/src/encoder.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
#include "encoder.h"
#include "usart.h"
#include "input.h"
#include "pwm.h"
#include "hall.h"
#include "utils.h"
#include "adc.h"
#include "math.h"
volatile int32_t encoder_count;
uint16_t encoder_shaft_pos; //this is the shaft position as encoder counts
uint16_t encoder_commutation_pos; //this is shaft position from the beginning of current commuatiton sequence.
#ifndef SINUSOID_DRIVE
uint8_t encoder_commutation_table[4096]; //20 poles max //8096 PPR max at the moment.
#else
int16_t sine_table[4096]; //the required length of sine_table is encoder_ppr/number_of_poles, so this allows quite high ppr encoder..
uint16_t commutation_length; //how many encoder steps there are per commutation circle (i.e encoder_ppr/motor_poles)
#endif
volatile uint16_t encoder_lastCount;
//uint16_t findNextEncoderCommutationCNT(int8_t dir);
void buildCommutationTable()
{
uint16_t i;
#ifndef SINUSOID_DRIVE
for(i=0;i<s.encoder_PPR;i++)
{
encoder_commutation_table[i] = commutation_sequence[(i*s.encoder_poles*6/s.encoder_PPR) % 6];
}
#else
commutation_length = s.encoder_PPR/s.encoder_poles;
for(i=0;i<commutation_length;i++)
{
sine_table[i] = (int16_t)(sinf((float)i/(float)commutation_length*2*M_PI)*(float)SINE_TABLE_MAX);
}
#endif
}
#ifndef SINUSOID_DRIVE
void forcedInitialization()
{
//during initialization the positive voltage will be applied to Channel1 and negative to Channel3. This will move the rotor to commutation position 1
if(motor_running)
return;
TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Enable);
TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_ForcedAction_InActive);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Enable);
TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_ForcedAction_Active);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Enable);
uint16_t i;
for(i=0;i<1000;i++)
{
TIM1->CCR1=i;
TIM1->CCR2=i;
TIM1->CCR3=i;
delay_ms(1);
}
delay_ms(10);
TIM_SetCounter(ENCODER_TIM,0);
encoder_count=0;
encoder_lastCount=0;
encoder_shaft_pos=0;
delay_ms(1);
TIM1->CCR1=0;
TIM1->CCR2=0;
TIM1->CCR3=0;
}
#else
void forcedInitialization()
{
//apply positive voltage (PWM) to phase B and negative to phase C. (Commutation table starts from that position)
if(motor_running)
return;
//TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_ForcedAction_InActive);
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Disable);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Disable);
TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Enable);
TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_ForcedAction_Active);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Enable);
uint16_t i;
for(i=2000;i<4000;i++)
{
//increase duty until ADC kicks in
if(i>max_duty)
{
TIM1->CCR1=max_duty;
TIM1->CCR2=max_duty;
TIM1->CCR3=max_duty;
}
else
{
TIM1->CCR1=i;
TIM1->CCR2=i;
TIM1->CCR3=i;
}
delay_ms(1);
}
delay_ms(100);
TIM_SetCounter(ENCODER_TIM,0);
encoder_count=0;
encoder_lastCount=0;
encoder_shaft_pos=0;
delay_ms(1);
pwm_motorStop();
}
#endif
void initEncoder()
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB, ENABLE);
if( ENCODER_TIM==TIM2)
{
#ifndef ENCODER_TIM2_REMAP
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
#else
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
GPIO_PinRemapConfig(GPIO_PartialRemap1_TIM2, ENABLE);
#endif
} else
{
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
}
TIM_DeInit(ENCODER_TIM);
TIM_TimeBaseInitTypeDef timerInitStructure;
TIM_TimeBaseStructInit(&timerInitStructure);
timerInitStructure.TIM_Prescaler = 0;
timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up;
timerInitStructure.TIM_Period = 0xFFFF;
timerInitStructure.TIM_ClockDivision = 0;
timerInitStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(ENCODER_TIM, &timerInitStructure);
TIM_EncoderInterfaceConfig (ENCODER_TIM, TIM_EncoderMode_TI12,
TIM_ICPolarity_Rising,
TIM_ICPolarity_Rising);
TIM_Cmd(ENCODER_TIM, ENABLE);
if(s.commutationMethod == commutationMethod_Encoder)
{
buildCommutationTable();
forcedInitialization();
}
if(s.commutationMethod == commutationMethod_HALL)
{
encoder_count=0;
encoder_lastCount=0;
encoder_shaft_pos=0;
}
}
void getEncoderCount()
{
uint16_t now = ENCODER_TIM->CNT;
int16_t delta = (int16_t)(now - encoder_lastCount);
encoder_lastCount = now;
encoder_count += delta;
//encoder_full_rounds = encoder_count / s.encoder_PPR;
int16_t shaft_pos_tmp = (encoder_count+ s.commutation_offset ) % s.encoder_PPR;
if(shaft_pos_tmp < 0)
encoder_shaft_pos = s.encoder_PPR + shaft_pos_tmp;
else
encoder_shaft_pos = shaft_pos_tmp;
#ifdef SINUSOID_DRIVE
encoder_commutation_pos = encoder_shaft_pos % commutation_length;
#endif
}
#ifdef SINUSOID_DRIVE
uint16_t getCommutationPos(uint8_t phase)
{
//if driving forward, the commutation must lead the actual position by 90 degrees
//if driving backward, the commutation must lag the actual position by 90 degrees
int32_t tmp;
if(dir)
{
tmp = (encoder_commutation_pos - commutation_length/4 + commutation_length*phase/3);
if (tmp<0)
{
tmp+=commutation_length;
}
return (uint16_t)(tmp % commutation_length);
}
else
{
tmp= (encoder_commutation_pos + commutation_length/4 + commutation_length*phase/3);
if (tmp<0)
{
tmp+=commutation_length;
}
return (uint16_t)(tmp % commutation_length);
}
}
#endif
================================================
FILE: firmware/src/encoder.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ENCODER_H_
#define ENCODER_H_
#include "configuration.h"
#define ENCODER_TIM TIM2
//#define ENCODER_TIM2_REMAP //with this TIM2 connected to PA15 and PB3
void initEncoder();
void getEncoderCount();
uint16_t findCurrentEncoderCommutationPos();
uint16_t findNextEncoderCommutationPos(int8_t dir);
extern volatile servoConfig s;
extern volatile int32_t encoder_count;
extern uint16_t encoder_shaft_pos; //this is the shaft position as encoder counts
extern uint16_t encoder_commutation_pos; //this is shaft position from the beginning of current commuatiton sequence.
#ifndef SINUSOID_DRIVE
extern uint8_t encoder_commutation_table[4096]; //20 poles max //8096 PPR max at the moment.
#else
#define SINE_TABLE_MAX 32767
extern int16_t sine_table[4096]; //20 poles max //8096 PPR max at the moment.
#endif
#endif /* ENCODER_H_ */
================================================
FILE: firmware/src/hall.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
#include "hall.h"
#include "pwm.h"
volatile uint16_t lasthallpos;
volatile uint16_t hallpos;
void initHALL()
{
//Hall sensor is connected to TIM4
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_Init(GPIOB, &GPIO_InitStructure);
lasthallpos = ((GPIO_ReadInputData(GPIOB)>>6) & 0x0007);
hallpos = ((GPIO_ReadInputData(GPIOB)>>6) & 0x0007);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Prescaler = 126;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseStructure.TIM_Period = 65535;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);
TIM_SelectHallSensor(TIM4, ENABLE);
TIM_SelectInputTrigger(TIM4, TIM_TS_TI1F_ED);
TIM_SelectSlaveMode(TIM4, TIM_SlaveMode_Reset);
TIM_ICInitTypeDef TIM_ICInitStructure;
TIM_ICInitStructure.TIM_Channel = TIM_Channel_1;
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;
// listen to T1, the HallSensorEvent
TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_TRC;
// Div:1, every edge
TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
// input noise filter (reference manual page 322)
TIM_ICInitStructure.TIM_ICFilter = 0xF;
TIM_ICInit(TIM4, &TIM_ICInitStructure);
TIM_OCInitTypeDef TIM_OCInitStructure;
TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM2;
TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;
TIM_OCInitStructure.TIM_Pulse = BLDC_DELAY; // 1 is no delay; 2000 = 7ms
TIM_OC2Init(TIM4, &TIM_OCInitStructure);
// clear interrupt flag
TIM_ClearFlag(TIM4, TIM_FLAG_CC2);
TIM_SelectOutputTrigger(TIM4, TIM_TRGOSource_OC2Ref);
TIM_ITConfig(TIM4, TIM_IT_CC1 | TIM_IT_CC2, ENABLE);
TIM_Cmd(TIM4, ENABLE);
// we use preemption interrupts here, BLDC Bridge switching and
// Hall has highest priority
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void TIM4_IRQHandler(void) {
if (TIM_GetITStatus(TIM4, TIM_IT_CC1) != RESET)
{
TIM_ClearITPendingBit(TIM4, TIM_IT_CC1);
// calculate motor speed or else with CCR1 values
}
else if (TIM_GetITStatus(TIM4, TIM_IT_CC2) != RESET)
{
#ifndef SINUSOID_DRIVE
TIM_ClearITPendingBit(TIM4, TIM_IT_CC2);
uint16_t newhallpos = ((GPIO_ReadInputData(GPIOB)>>6) & 0x0007);
if (newhallpos == hallpos) return;
hallpos = newhallpos;
pwm_Commute(hallpos);
} else {
;
#endif
}
}
================================================
FILE: firmware/src/hall.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef HALL_H_
#define HALL_H_
extern volatile uint16_t lasthallpos;
extern volatile uint16_t hallpos;
void initHALL();
#endif /* HALL_H_ */
================================================
FILE: firmware/src/input.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
#include <stm32f10x_exti.h>
#include "pwm.h"
#include "encoder.h"
#include "pid.h"
#include "input.h"
#include "configuration.h"
volatile uint16_t updateCtr;
volatile uint16_t motor_running;
void initLeds()
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
//LED0 == ENABLE Led
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);
//LED1 == ERROR Led
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);
//LED2 == POWER Led
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);
}
void initStepDirInput()
{
GPIO_InitTypeDef GPIO_InitStructure;
//PA6 as STEP input
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
//PA7 as DIR pin
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
//PA5 as ENA pin
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource6); //STEP pin
GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource5); //ENA pin
EXTI_InitTypeDef EXTI_initStructure;
EXTI_initStructure.EXTI_Line = EXTI_Line6;
EXTI_initStructure.EXTI_Mode = EXTI_Mode_Interrupt;
if(!is_step_inverted)
EXTI_initStructure.EXTI_Trigger = EXTI_Trigger_Rising;
else
EXTI_initStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_initStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_initStructure);
EXTI_initStructure.EXTI_Line = EXTI_Line5;
EXTI_initStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_initStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling;
EXTI_initStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_initStructure);
NVIC_InitTypeDef nvicStructure;
nvicStructure.NVIC_IRQChannel = EXTI9_5_IRQn;
nvicStructure.NVIC_IRQChannelPreemptionPriority = 0;
nvicStructure.NVIC_IRQChannelSubPriority = 2;
nvicStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&nvicStructure);
}
void EXTI9_5_IRQHandler()
{
uint8_t ena,idir;
if(EXTI_GetITStatus(EXTI_Line5)!= RESET)
{
//ENA PIN INTERRUPT
if(!is_ena_inverted)
ena = GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_5);
else
ena = (~(GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_5)))&1;
if(ena && !motor_running)
{
//enable rose. Start
pid_requested_position = encoder_count; //reset the desired position to current.
pwm_motorStart();
ENABLE_LED_ON;
ERROR_LED_OFF;
}
else if(!ena && motor_running)
{
//enable fell. Stop.
pwm_motorStop();
ENABLE_LED_OFF;
}
else if(!ena)
{
ENABLE_LED_OFF;
}
EXTI_ClearITPendingBit(EXTI_Line5);
}
if(EXTI_GetITStatus(EXTI_Line6)!= RESET)
{
//STEP PIN INTERRUPT
if(!is_dir_inverted)
idir = GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_7);
else
idir = (~(GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_7)))&1;
if(idir)
{
pid_requested_position+=s.encoder_counts_per_step;
}
else
pid_requested_position-=s.encoder_counts_per_step;
EXTI_ClearITPendingBit(EXTI_Line6);
}
}
void initPWMInput()
{
GPIO_InitTypeDef GPIO_InitStructure;
//TIM3 as PWM input
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
//PA7 as DIR pin
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
//PA5 as ENA pin
GPIO_StructInit(&GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;
GPIO_Init(GPIOA, &GPIO_InitStructure);
EXTI_InitTypeDef EXTI_initStructure;
EXTI_initStructure.EXTI_Line = EXTI_Line5;
EXTI_initStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_initStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling;
EXTI_initStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_initStructure);
NVIC_InitTypeDef nvicStructure;
nvicStructure.NVIC_IRQChannel = EXTI9_5_IRQn;
nvicStructure.NVIC_IRQChannelPreemptionPriority = 0;
nvicStructure.NVIC_IRQChannelSubPriority = 2;
nvicStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&nvicStructure);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructInit(&TIM_TimeBaseStructure);
TIM_TimeBaseStructure.TIM_Prescaler = 1;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseStructure.TIM_Period = 65535;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure);
TIM_ICInitTypeDef TIM_ICInit;
if(!is_step_inverted)
TIM_ICInit.TIM_ICPolarity = TIM_ICPolarity_Rising;
else
TIM_ICInit.TIM_ICPolarity = TIM_ICPolarity_Falling;
TIM_ICInit.TIM_ICFilter = 5;
TIM_ICInit.TIM_Channel = TIM_Channel_1;
TIM_ICInit.TIM_ICPrescaler = TIM_ICPSC_DIV1;
TIM_ICInit.TIM_ICSelection = TIM_ICSelection_DirectTI;
TIM_PWMIConfig(TIM3, &TIM_ICInit);
TIM_CCxCmd(TIM3, TIM_Channel_1, ENABLE);
TIM_CCxCmd(TIM3, TIM_Channel_2, ENABLE);
TIM_SelectInputTrigger(TIM3,TIM_TS_TI1FP1);
TIM_SelectSlaveMode(TIM3, TIM_SlaveMode_Reset);
TIM_ITConfig(TIM3, TIM_IT_CC1 | TIM_IT_Update, ENABLE);
TIM_Cmd(TIM3,ENABLE);
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void TIM3_IRQHandler(void) {
if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET)
{
if(s.inputMethod==inputMethod_stepDir)
{
updatePid();
TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
}
else
{
TIM_ClearITPendingBit(TIM3, TIM_IT_Update);
updateCtr++;
if(updateCtr>50)
{
//pwm_motorStop();
//ERROR_LED_ON;
}
}
}
if (TIM_GetITStatus(TIM3, TIM_IT_CC1) != RESET)
{
uint16_t tim3_dc = TIM3->CCR2;
uint16_t tim3_per = TIM3->CCR1;
uint16_t DC;
if(!is_dir_inverted)
dir = GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_7);
else
dir = (~(GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_7)))&1;
if(tim3_per>0 && tim3_per>tim3_dc)
{
DC = ((uint32_t)(BLDC_CHOPPER_PERIOD*tim3_dc)/(uint32_t)tim3_per);
}
else
DC=0;
//if(DC<BLDC_NOL*3) DC=BLDC_NOL*3;
duty = DC;
updateCtr=0;
#ifndef SINUSOID_DRIVE
pwm_setDutyCycle();
#endif
TIM_ClearITPendingBit(TIM3, TIM_IT_CC1);
}
}
================================================
FILE: firmware/src/input.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef INPUT_H_
#define INPUT_H_
#include <stdint.h>
extern volatile uint8_t dir;
#define POWER_LED_ON GPIO_SetBits(GPIOC, GPIO_Pin_15);
#define POWER_LED_OFF GPIO_ResetBits(GPIOC, GPIO_Pin_15);
#define ENABLE_LED_ON GPIO_SetBits(GPIOC, GPIO_Pin_13);
#define ENABLE_LED_OFF GPIO_ResetBits(GPIOC, GPIO_Pin_13);
#define ERROR_LED_ON GPIO_SetBits(GPIOC, GPIO_Pin_14);
#define ERROR_LED_OFF GPIO_ResetBits(GPIOC, GPIO_Pin_14);
extern volatile uint16_t updateCtr;
extern volatile uint16_t motor_running;
void initStepDirInput();
void initPWMInput();
void initLeds();
#endif /* INPUT_H_ */
================================================
FILE: firmware/src/main.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
#include <stm32f10x_dma.h>
#include <stm32f10x_flash.h>
#include "pwm.h"
#include "hall.h"
#include "adc.h"
#include "input.h"
#include "encoder.h"
#include "pid.h"
#include "usart.h"
#include "configuration.h"
#include "input.h"
#include "utils.h"
volatile uint8_t dir;
volatile servoConfig s;
int main() {
motor_running=0;
updateCtr=0;
dir=1;
FLASH_Unlock();
getConfig();
#ifdef SINUSOID_DRIVE
//sinusoid always needs encoder.
s.commutationMethod = commutationMethod_Encoder;
#endif
initUSART(s.usart_baud);
printConfiguration();
systickInit(1000);
initPWM();
initADC();
if( s.commutationMethod == commutationMethod_HALL)
{
initHALL();
}
if(s.inputMethod == inputMethod_stepDir)
{
initStepDirInput();
}
else if (s.inputMethod == inputMethod_pwmVelocity)
{
initPWMInput();
}
if(s.inputMethod == inputMethod_stepDir || s.commutationMethod == commutationMethod_Encoder)
{
initEncoder();
}
if(s.inputMethod == inputMethod_stepDir)
{
initPid();
}
initLeds();
POWER_LED_ON;
uint8_t ena;
//check if ENA is on already at start. If it is, start motor.
if(!is_ena_inverted)
ena = GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_5);
else
ena = (~(GPIO_ReadInputDataBit(GPIOA, GPIO_Pin_5)))&1;
if(ena)
{
pwm_motorStart();
ENABLE_LED_ON;
}
//two different types of main loops depending on commutation method
if(s.commutationMethod == commutationMethod_Encoder || s.inputMethod == inputMethod_stepDir)
{
while (1)
{
getEncoderCount();
#ifdef SINUSOID_DRIVE
pwm_setDutyCycle();
#endif
#ifndef SINUSOID_DRIVE
//check commutation position for trapezoid commutation if done by encoder
if(s.commutationMethod == commutationMethod_Encoder && encoder_commutation_pos != encoder_commutation_table[encoder_shaft_pos])
{
encoder_commutation_pos = encoder_commutation_table[encoder_shaft_pos];
pwm_Commute(encoder_commutation_pos);
}
#endif
if(serial_stream_enabled && DMA_GetFlagStatus(DMA1_FLAG_TC2) == SET)
{
//dma transfer is complete
usart_send_stream();
}
}
}
else
{
while(1)
{
//commutation handled by HALL sensor interrupts in this case
pwm_setDutyCycle();
if(serial_stream_enabled && DMA_GetFlagStatus(DMA1_FLAG_TC2) == SET)
{
//dma transfer is complete
usart_send_stream();
}
}
}
}
================================================
FILE: firmware/src/pid.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
Pid loop is based on F103ServoDrive project of Mihai.
http://www.cnczone.com/forums/open-source-controller-boards/283428-cnc.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stdlib.h>
#include "pid.h"
#include "pwm.h"
#include "hall.h"
#include "encoder.h"
#include "input.h"
#include "configuration.h"
int32_t position_error;
int32_t pid_requested_position;
int32_t pid_last_requested_position;
int32_t pid_last_requested_position_delta;
volatile int32_t pid_integrated_error;
int32_t pid_prev_position_error;
uint32_t max_error; //statistics
volatile uint16_t duty;
void initPid()
{
pid_requested_position=encoder_count;
pid_integrated_error = 0;
pid_prev_position_error =0;
//TIM3 used for pid loop timing.
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE);
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Prescaler = 72; //1MHz counter
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseStructure.TIM_Period = PID_TIM_PERIOD; //4kHz update interval
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure);
TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE);
TIM_Cmd(TIM3, ENABLE);
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x02;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
//This is called from TIM3 update interrupt. defined in input.c
void updatePid()
{
uint32_t abs_position_error;
int32_t position_delta;
int32_t position_delta_delta;
//getEncoderCount(); //this is dangerous to call from interrupt
if (!motor_running)
{
pid_integrated_error=0;
return;
}
position_error = encoder_count - pid_requested_position;
position_delta= pid_requested_position - pid_last_requested_position;
position_delta_delta = position_delta - pid_last_requested_position_delta;
pid_last_requested_position = pid_requested_position;
pid_last_requested_position_delta = position_delta;
abs_position_error = abs(position_error);
if(abs_position_error < s.pid_deadband)
{
position_error=0;
}
else if (position_error > 0)
position_error -= s.pid_deadband;
else
position_error += s.pid_deadband;
if(abs_position_error > max_error)
max_error = abs_position_error;
if (abs_position_error > s.max_error)
{
pwm_motorStop();
ERROR_LED_ON;
return;
}
//P
int32_t output = position_error * s.pid_Kp;
//I
pid_integrated_error += position_error * s.pid_Ki;
if (pid_integrated_error > 400000)
pid_integrated_error = 400000;
if (pid_integrated_error < -400000)
pid_integrated_error = -400000;
output += pid_integrated_error;
//D
output += (position_error - pid_prev_position_error) * s.pid_Kd;
pid_prev_position_error = position_error;
//FF1
output += position_delta * s.pid_FF1;
//FF2
output += position_delta_delta * s.pid_FF2;
output /= 100; //provide larger dynamic range for pid. (without this, having pid_Ki = 1 was enough for oscillation.
//limit output power
if (output > MAX_DUTY)
output = MAX_DUTY;
if (output < -MAX_DUTY)
output = -MAX_DUTY;
if(output>0)
{
dir=0;
}
else
{
dir=1;
}
duty = abs(output);
pwm_setDutyCycle();
}
================================================
FILE: firmware/src/pid.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
Pid loop is based on F103ServoDrive project of Mihai.
http://www.cnczone.com/forums/open-source-controller-boards/283428-cnc.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PID_H_
#define PID_H_
#include "configuration.h"
#include <stdint.h>
void initPid();
void updatePid();
extern volatile servoConfig s;
extern int32_t position_error;
extern int32_t pid_requested_position;
extern int32_t pid_last_requested_position;
extern uint32_t pid_max_pos_error;
extern int32_t pid_last_requested_position_delta;
extern volatile int32_t pid_integrated_error;
extern int32_t pid_prev_position_error;
extern uint32_t max_error; //statistics
extern volatile uint16_t duty;
#endif /* PID_H_ */
================================================
FILE: firmware/src/pwm.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
Original PWM commutation tables and ideas on PWM commutation from a great article in http://www.mikrocontroller.net/articles/STM32_BLDC_Control_with_HALL_Sensor
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stm32f10x_tim.h>
#include <stm32f10x_rcc.h>
#include "pwm.h"
#include "input.h"
#include "hall.h"
#include "encoder.h"
#include "configuration.h"
#include "adc.h"
#include "pid.h"
#define FALSE 0
#define TRUE 1
volatile uint8_t errorInCommutation;
static const uint8_t BLDC_BRIDGE_STATE_BACKWARD[8][6] = // Motor step
{
{ FALSE,FALSE , FALSE,FALSE , FALSE,FALSE }, // //000
{ FALSE,FALSE, TRUE,FALSE, FALSE,TRUE },
{ TRUE,FALSE, FALSE,TRUE, FALSE,FALSE },
{ TRUE,FALSE, FALSE,FALSE, FALSE,TRUE },
{ FALSE,TRUE, FALSE,FALSE, TRUE,FALSE },
{ FALSE,TRUE, TRUE,FALSE, FALSE,FALSE },
{ FALSE,FALSE, FALSE,TRUE, TRUE,FALSE },
{ FALSE,FALSE , FALSE,FALSE , FALSE,FALSE }, // //111
};
static const uint8_t BLDC_BRIDGE_STATE_VORWARD[8][6] = // Motor step
{
{ FALSE,FALSE , FALSE,FALSE , FALSE,FALSE }, // 0 //000
{ FALSE,FALSE, FALSE,TRUE, TRUE,FALSE },
{ FALSE,TRUE, TRUE,FALSE, FALSE,FALSE },
{ FALSE,TRUE, FALSE,FALSE, TRUE,FALSE },
{ TRUE,FALSE, FALSE,FALSE, FALSE,TRUE },
{ TRUE,FALSE, FALSE,TRUE, FALSE,FALSE },
{ FALSE,FALSE, TRUE,FALSE, FALSE,TRUE },
{ FALSE,FALSE , FALSE,FALSE , FALSE,FALSE }, // 0 //111
};
void UpdatePWMChannels(uint8_t BL1,uint8_t BL2,uint8_t BL3,uint8_t BH1,uint8_t BH2,uint8_t BH3);
void initPWM()
{
GPIO_InitTypeDef GPIO_InitStructure;
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_OCInitTypeDef TIM_OCInitStructure;
TIM_BDTRInitTypeDef TIM_BDTRInitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB, ENABLE);
//initialize Tim1 PWM outputs
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);
// Time Base configuration
TIM_TimeBaseStructure.TIM_Prescaler = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseStructure.TIM_Period = BLDC_CHOPPER_PERIOD;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM1, &TIM_TimeBaseStructure);
// Channel 1, 2, 3 – set to PWM mode - all 6 outputs
TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_Timing;
TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
TIM_OCInitStructure.TIM_OutputNState = TIM_OutputNState_Enable;
TIM_OCInitStructure.TIM_Pulse = 0; // initialize to zero output
TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;
TIM_OCInitStructure.TIM_OCNPolarity = TIM_OCNPolarity_High;
TIM_OCInitStructure.TIM_OCIdleState = TIM_OCIdleState_Set;
TIM_OCInitStructure.TIM_OCNIdleState = TIM_OCNIdleState_Set;
TIM_OC1Init(TIM1, &TIM_OCInitStructure);
TIM_OC2Init(TIM1, &TIM_OCInitStructure);
TIM_OC3Init(TIM1, &TIM_OCInitStructure);
TIM_OC4Init(TIM1, &TIM_OCInitStructure); //for ADC
TIM_BDTRInitStructure.TIM_OSSRState = TIM_OSSRState_Enable;
TIM_BDTRInitStructure.TIM_OSSIState = TIM_OSSIState_Enable;
TIM_BDTRInitStructure.TIM_LOCKLevel = TIM_LOCKLevel_OFF;
// DeadTime[ns] = value * (1/SystemCoreFreq) (on 72MHz: 7 is 98ns)
TIM_BDTRInitStructure.TIM_DeadTime = BLDC_NOL;
TIM_BDTRInitStructure.TIM_AutomaticOutput = TIM_AutomaticOutput_Enable;
//no break functionality
TIM_BDTRInitStructure.TIM_Break = TIM_Break_Disable;
TIM_BDTRInitStructure.TIM_BreakPolarity = TIM_BreakPolarity_Low;
TIM_BDTRConfig(TIM1, &TIM_BDTRInitStructure);
//Commutation event mapped to TIM4 - We are not using commute event, but interrupt from Hall timer directly to commute.
//Not optimal solution?
//TIM_SelectInputTrigger(TIM1, TIM_TS_ITR3);
TIM_ITConfig(TIM1, TIM_IT_CC4, ENABLE); //adc sampling interrupt
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = TIM1_CC_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
TIM_Cmd(TIM1, ENABLE);
// enable motor timer main output (the bridge signals)
TIM_CtrlPWMOutputs(TIM1, ENABLE);
pwm_motorStop();
}
void TIM1_CC_IRQHandler(void)
{
if (TIM_GetITStatus(TIM1, TIM_IT_CC4) != RESET)
{
ADC_SoftwareStartConvCmd(ADC1, ENABLE);
TIM_ClearITPendingBit(TIM1, TIM_IT_CC4);
}
}
#ifndef SINUSOID_DRIVE
void pwm_setDutyCycle()
{
static uint8_t prevdir=0;
if(!motor_running)
return;
if(dir!=prevdir)
{
pwm_InitialBLDCCommutation();
}
prevdir=dir;
uint16_t d = duty;
if(d>MAX_DUTY) d = MAX_DUTY; //this is absolute MAX
if(d>max_duty) d = max_duty; //this is maximum set by ADC current limiting
TIM1->CCR1 = d;
TIM1->CCR2 = d;
TIM1->CCR3 = d;
TIM1->CCR4 = d>>1; //get the ADC conversion on the half duty cycle.
}
#else
void pwm_setDutyCycle()
{
if(!motor_running)
return;
uint16_t pos[3];
pos[0] = getCommutationPos(0);
pos[1] = getCommutationPos(1);
pos[2] = getCommutationPos(2);
uint16_t d = duty;
if(d>MAX_DUTY) d = MAX_DUTY; //this is absolute MAX
if(d>max_duty) d = max_duty; //this is maximum set by ADC current limiting
TIM1->CCR1 = (int32_t)sine_table[pos[0]]*d/SINE_TABLE_MAX+ZERO_DUTY;
TIM1->CCR2 = (int32_t)sine_table[pos[1]]*d/SINE_TABLE_MAX+ZERO_DUTY;
TIM1->CCR3 = (int32_t)sine_table[pos[2]]*d/SINE_TABLE_MAX+ZERO_DUTY;
TIM1->CCR4 = d>>1; //get the ADC conversion on the half duty cycle.
}
#endif
void pwm_motorStart()
{
motor_running=1;
#ifndef SINUSOID_DRIVE
pwm_InitialBLDCCommutation();
TIM_ITConfig(TIM4, TIM_IT_CC1 | TIM_IT_CC2, ENABLE); //enable HALL interrupts
#else
//on sinusoid drive, all channels enabled at once
TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Enable);
TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_2, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Enable);
TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Enable);
#endif
}
void pwm_motorStop()
{
motor_running=0;
TIM1->CCR1 = 0;
TIM1->CCR2 = 0;
TIM1->CCR3 = 0;
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Disable);
TIM_CCxCmd(TIM1, TIM_Channel_2, TIM_CCx_Disable);
TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Disable);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Disable);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Disable);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Disable);
#ifndef SINUSOID_DRIVE
TIM_ITConfig(TIM4, TIM_IT_CC1 | TIM_IT_CC2, DISABLE); //disable HALL interrupts, no commutation!
#endif
}
#ifndef SINUSOID_DRIVE
void pwm_InitialBLDCCommutation()
{
uint16_t newhallpos;
if(s.commutationMethod == commutationMethod_HALL)
{
//this function is called when forced commutation is required, eg when starting or when anomalies are detected.
newhallpos = ((GPIO_ReadInputData(GPIOB)>>6) & 0x0007);
hallpos = newhallpos;
pwm_Commute(hallpos);
return;
}
else
{
encoder_commutation_pos = encoder_commutation_table[encoder_shaft_pos];
pwm_Commute(encoder_commutation_pos);
return;
}
}
void pwm_Commute(uint8_t comm_pos)
{
uint8_t BH1,BH2,BH3,BL1,BL2,BL3;
if(dir)
{
BH1 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][0];
BL1 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][1];
BH2 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][2];
BL2 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][3];
BH3 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][4];
BL3 = BLDC_BRIDGE_STATE_VORWARD[comm_pos][5];
}
else
{
BH1 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][0];
BL1 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][1];
BH2 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][2];
BL2 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][3];
BH3 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][4];
BL3 = BLDC_BRIDGE_STATE_BACKWARD[comm_pos][5];
}
UpdatePWMChannels(BL1,BL2,BL3,BH1,BH2,BH3);
}
void UpdatePWMChannels(uint8_t BL1,uint8_t BL2,uint8_t BL3,uint8_t BH1,uint8_t BH2,uint8_t BH3)
{
//THIS NEEDS OPTIMIZATION!
// **** this is with active freewheeling ****
// Bridge FETs for Motor Phase U
if (BH1) {
// PWM at low side FET of bridge U
// active freewheeling at high side FET of bridge U
// if low side FET is in PWM off mode then the hide side FET
// is ON for active freewheeling. This mode needs correct definition
// of dead time otherwise we have shoot-through problems
TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Enable);
} else {
// Low side FET: OFF
TIM_CCxCmd(TIM1, TIM_Channel_1, TIM_CCx_Disable);
if (BL1){
// High side FET: ON
TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_ForcedAction_Active);
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Enable);
} else {
// High side FET: OFF
TIM_CCxNCmd(TIM1, TIM_Channel_1, TIM_CCxN_Disable);
}
}
// Bridge FETs for Motor Phase V
if (BH2) {
TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_2, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Enable);
} else {
TIM_CCxCmd(TIM1, TIM_Channel_2, TIM_CCx_Disable);
if (BL2){
TIM_SelectOCxM(TIM1, TIM_Channel_2, TIM_ForcedAction_Active);
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Enable);
} else {
TIM_CCxNCmd(TIM1, TIM_Channel_2, TIM_CCxN_Disable);
}
}
// Bridge FETs for Motor Phase W
if (BH3) {
TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_OCMode_PWM1);
TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Enable);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Enable);
} else {
TIM_CCxCmd(TIM1, TIM_Channel_3, TIM_CCx_Disable);
if (BL3){
TIM_SelectOCxM(TIM1, TIM_Channel_3, TIM_ForcedAction_Active);
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Enable);
} else {
TIM_CCxNCmd(TIM1, TIM_Channel_3, TIM_CCxN_Disable);
}
}
}
#endif
================================================
FILE: firmware/src/pwm.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PWM_H
#define PWM_H
#include "configuration.h"
static const uint8_t commutation_sequence[6] = {1,3,2,6,4,5};//{001,011,010,110,100,101}
static const uint8_t pos_in_sequence[8] = {0,1,3,2,5,6,4,0};
extern volatile servoConfig s;
void enableHallCommutateSignal();
void disableHallCommutateSignal();
void initPWM();
void pwm_BLDCMotorPrepareCommutation();
void pwm_Commute(uint8_t comm_pos);
void pwm_InitialBLDCCommutation();
void pwm_setDutyCycle();
void pwm_motorStart();
void pwm_motorStop();
#endif
================================================
FILE: firmware/src/usart.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stm32f10x_gpio.h>
#include <stm32f10x_usart.h>
#include <stm32f10x_rcc.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "usart.h"
#include "pid.h"
#include "pwm.h"
#include "encoder.h"
#include "adc.h"
#include "hall.h"
#include "configuration.h"
char txbuffer[255];
volatile uint8_t serial_stream_enabled;
char recvbuffer[255];
uint8_t recvctr;
DMA_InitTypeDef DMA_InitStructure;
void initUSART(uint16_t baud)
{
recvctr=0;
serial_stream_enabled=0;
GPIO_InitTypeDef GPIO_InitStructure;
USART_InitTypeDef USART_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
if(USART == USART1)
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_AFIO |
RCC_APB2Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 ;
GPIO_Init(GPIOA, &GPIO_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 5;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
else if(USART==USART3)
{
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
/* Configure USART3_Rx as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOB, &GPIO_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 5;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
USART_InitStructure.USART_BaudRate = baud*100;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART, &USART_InitStructure);
USART_ITConfig(USART, USART_IT_RXNE, ENABLE);
USART_Cmd(USART, ENABLE);
//DMA for USART TX!
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
/* USARTy_Tx_DMA_Channel (triggered by USARTy Tx event) Config */
DMA_DeInit(DMA1_Channel2);
DMA_InitStructure.DMA_PeripheralBaseAddr = 0x40004804;
DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)txbuffer;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralDST;
DMA_InitStructure.DMA_BufferSize = 255;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte;
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
DMA_InitStructure.DMA_Priority = DMA_Priority_VeryHigh;
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_Init(DMA1_Channel2, &DMA_InitStructure);
USART_DMACmd(USART3, USART_DMAReq_Tx, ENABLE);
//DMA_Cmd(DMA1_Channel2, ENABLE);
}
void usart_startDMA(uint16_t len)
{
DMA_DeInit(DMA1_Channel2);
DMA_InitStructure.DMA_PeripheralBaseAddr = 0x40004804;
DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)txbuffer;
DMA_InitStructure.DMA_BufferSize = len;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;
DMA_Init(DMA1_Channel2, &DMA_InitStructure);
DMA_Cmd(DMA1_Channel2, ENABLE);
}
void usart_sendChar(char chr)
{
USART_SendData(USART, chr);
while (USART_GetFlagStatus(USART, USART_FLAG_TXE) == RESET);
}
void usart_sendStr(char *str)
{
while (*str != '\0')
{
usart_sendChar(*str);
str ++;
}
}
void usart_send_stream()
{
// while (DMA_GetFlagStatus(DMA1_FLAG_TC2) == RESET)
// {
// }
uint16_t hall;
if (s.commutationMethod == commutationMethod_Encoder)
hall = encoder_commutation_pos;
else
{
hall = hallpos;
}
uint16_t len = sprintf(txbuffer, "STR:%d;%d;%d;%d;%d;%d;%d;%d\r",(int)hall,(int)encoder_count,(int)pid_requested_position,(int)pid_last_requested_position_delta,(int)position_error,(int)ADC_value,(int)TIM1->CCR1,(int)pid_integrated_error);
usart_startDMA(len);
}
void parseUsart()
{
const char delimiters[] = " ";
char *param;
char *value;
if(strstr(recvbuffer, "STREAM")!=NULL)
{
strtok(recvbuffer,delimiters); //first param
value = strtok(NULL,delimiters);
if(strstr(value,"START"))
{
serial_stream_enabled=1;
usart_send_stream();
}
else
serial_stream_enabled=0;
}
if(strstr(recvbuffer, "SET")!=NULL)
{
strtok(recvbuffer,delimiters); //first param
param = strtok(NULL,delimiters);
value = strtok(NULL,delimiters);
if(param!=NULL && value!=NULL)
setConfig(param,atoi(value));
}
if(strstr(recvbuffer, "SAVE")!=NULL)
{
usart_sendStr("Saving:\n\r");
printConfiguration();
writeConfig(s);
usart_sendStr("SAVE OK\n\r");
}
if(strstr(recvbuffer, "GET")!=NULL)
{
//getConfig();
printConfiguration();
}
if(recvctr < 3)
{
uint16_t len =sprintf(txbuffer, "Count: %d, Hall: %d, error: %d, max_error: %d\n\r",(int)encoder_count, (int)hallpos, (int)position_error, (int)max_error);
max_error=0;
usart_startDMA(len);
}
}
void serialInterrupt()
{
char in;
if(USART_GetITStatus(USART3, USART_IT_RXNE) != RESET)
{
in = (char)USART_ReceiveData(USART3);
recvbuffer[recvctr] = in;
if(in=='\r')
{
parseUsart();
recvctr=0;
}
else
{
//any received character will stop the stream.
serial_stream_enabled=0;
recvctr++;
}
}
}
void USART3_IRQHandler(void)
{
serialInterrupt();
}
void USART1_IRQHandler(void)
{
serialInterrupt();
}
================================================
FILE: firmware/src/usart.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef USART_H_
#define USART_H_
#include "configuration.h"
#define USART USART3
void initUSART(uint16_t baud);
void usart_sendChar(char chr);
void usart_sendStr(char *str);
void usart_send_stream();
extern volatile servoConfig s;
extern char txbuffer[255];
extern volatile uint8_t serial_stream_enabled;
#endif /* USART_H_ */
================================================
FILE: firmware/src/utils.c
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
The systick based delay_ms was learned from http://www.micromouseonline.com/2016/02/02/systick-configuration-made-easy-on-the-stm32/
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "utils.h"
#include <stddef.h>
#include <stdint.h>
#include <stm32f10x_rcc.h>
void systickInit (uint16_t frequency)
{
RCC_ClocksTypeDef RCC_Clocks;
RCC_GetClocksFreq (&RCC_Clocks);
(void) SysTick_Config (RCC_Clocks.HCLK_Frequency / frequency);
}
static volatile uint32_t ticks;
void SysTick_Handler (void)
{
ticks++;
}
uint32_t millis (void)
{
return ticks;
}
void delay_ms (uint32_t t)
{
uint32_t start, end;
start = millis();
end = start + t;
if (start < end) { while ( (millis() >= start) && (millis() < end)) {
};
}
}
/*
void delay_ms(const uint32_t ms)
{
uint32_t ms2 = ms*STM32_CLOCK_HZ / 1000 / STM32_CYCLES_PER_LOOP;
asm volatile(" mov r0, %[ms2] \n\t"
"loop: subs r0, #1 \n\t"
" bhi loop \n\t"
:
: [ms2] "r" (ms2)
: "r0");
}
*/
================================================
FILE: firmware/src/utils.h
================================================
/*
bldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.
Copyright (C) 2015 Pekka Roivainen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef UTILS_H_
#define UTILS_H_
#include <stddef.h>
#include <stdint.h>
#define STM32_CLOCK_HZ 72000000UL
#define STM32_CYCLES_PER_LOOP 6 // This will need tweaking or calculating
void systickInit (uint16_t frequency);
void delay_ms(const uint32_t ms);
#endif /* UTILS_H_ */
================================================
FILE: firmware/system/include/arm/semihosting.h
================================================
//
// This file is part of the µOS++ III distribution.
// Copyright (c) 2014 Liviu Ionescu.
//
#ifndef ARM_SEMIHOSTING_H_
#define ARM_SEMIHOSTING_H_
// ----------------------------------------------------------------------------
// Semihosting operations.
enum OperationNumber
{
// Regular operations
SEMIHOSTING_EnterSVC = 0x17,
SEMIHOSTING_ReportException = 0x18,
SEMIHOSTING_SYS_CLOSE = 0x02,
SEMIHOSTING_SYS_CLOCK = 0x10,
SEMIHOSTING_SYS_ELAPSED = 0x30,
SEMIHOSTING_SYS_ERRNO = 0x13,
SEMIHOSTING_SYS_FLEN = 0x0C,
SEMIHOSTING_SYS_GET_CMDLINE = 0x15,
SEMIHOSTING_SYS_HEAPINFO = 0x16,
SEMIHOSTING_SYS_ISERROR = 0x08,
SEMIHOSTING_SYS_ISTTY = 0x09,
SEMIHOSTING_SYS_OPEN = 0x01,
SEMIHOSTING_SYS_READ = 0x06,
SEMIHOSTING_SYS_READC = 0x07,
SEMIHOSTING_SYS_REMOVE = 0x0E,
SEMIHOSTING_SYS_RENAME = 0x0F,
SEMIHOSTING_SYS_SEEK = 0x0A,
SEMIHOSTING_SYS_SYSTEM = 0x12,
SEMIHOSTING_SYS_TICKFREQ = 0x31,
SEMIHOSTING_SYS_TIME = 0x11,
SEMIHOSTING_SYS_TMPNAM = 0x0D,
SEMIHOSTING_SYS_WRITE = 0x05,
SEMIHOSTING_SYS_WRITEC = 0x03,
SEMIHOSTING_SYS_WRITE0 = 0x04,
// Codes returned by SEMIHOSTING_ReportException
ADP_Stopped_ApplicationExit = ((2 << 16) + 38),
ADP_Stopped_RunTimeError = ((2 << 16) + 35),
};
// ----------------------------------------------------------------------------
// SWI numbers and reason codes for RDI (Angel) monitors.
#define AngelSWI_ARM 0x123456
#ifdef __thumb__
#define AngelSWI 0xAB
#else
#define AngelSWI AngelSWI_ARM
#endif
// For thumb only architectures use the BKPT instruction instead of SWI.
#if defined(__ARM_ARCH_7M__) \
|| defined(__ARM_ARCH_7EM__) \
|| defined(__ARM_ARCH_6M__)
#define AngelSWIInsn "bkpt"
#define AngelSWIAsm bkpt
#else
#define AngelSWIInsn "swi"
#define AngelSWIAsm swi
#endif
static inline int
__attribute__ ((always_inline))
call_host (int reason, void* arg)
{
int value;
asm volatile (
" mov r0, %[rsn] \n"
" mov r1, %[arg] \n"
" " AngelSWIInsn " %[swi] \n"
" mov %[val], r0"
: [val] "=r" (value) /* Outputs */
: [rsn] "r" (reason), [arg] "r" (arg), [swi] "i" (AngelSWI) /* Inputs */
: "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"
// Clobbers r0 and r1, and lr if in supervisor mode
);
// Accordingly to page 13-77 of ARM DUI 0040D other registers
// can also be clobbered. Some memory positions may also be
// changed by a system call, so they should not be kept in
// registers. Note: we are assuming the manual is right and
// Angel is respecting the APCS.
return value;
}
// ----------------------------------------------------------------------------
// Function used in _exit() to return the status code as Angel exception.
static inline void
__attribute__ ((always_inline,noreturn))
report_exception (int reason)
{
call_host (SEMIHOSTING_ReportException, (void*) reason);
for (;;)
;
}
// ----------------------------------------------------------------------------
#endif // ARM_SEMIHOSTING_H_
================================================
FILE: firmware/system/include/cmsis/README_CMSIS.txt
================================================
* -------------------------------------------------------------------
* Copyright (C) 2011-2014 ARM Limited. All rights reserved.
*
* Date: 17 February 2014
* Revision: V4.00
*
* Project: Cortex Microcontroller Software Interface Standard (CMSIS)
* Title: Release Note for CMSIS
*
* -------------------------------------------------------------------
These files are the CMSIS Core Support and CMSIS DSP Include Files.
To save space, from the complete ARM package (CMSIS-SP-00300-r4p0-00rel0.zip)
only the CMSIS/Include folder was used here.
================================================
FILE: firmware/system/include/cmsis/README_DEVICE.txt
================================================
The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip,
the folder:
STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
The cmsis_device.h is added for convenience.
================================================
FILE: firmware/system/include/cmsis/arm_common_tables.h
================================================
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2013 ARM Limited. All rights reserved.
*
* $Date: 16. October 2013
* $Revision: V1.4.2
*
* Project: CMSIS DSP Library
* Title: arm_common_tables.h
*
* Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions
*
* Target Processor: Cortex-M4/Cortex-M3
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
#ifndef _ARM_COMMON_TABLES_H
#define _ARM_COMMON_TABLES_H
#include "arm_math.h"
extern const uint16_t armBitRevTable[1024];
extern const q15_t armRecipTableQ15[64];
extern const q31_t armRecipTableQ31[64];
extern const q31_t realCoefAQ31[1024];
extern const q31_t realCoefBQ31[1024];
extern const float32_t twiddleCoef_16[32];
extern const float32_t twiddleCoef_32[64];
extern const float32_t twiddleCoef_64[128];
extern const float32_t twiddleCoef_128[256];
extern const float32_t twiddleCoef_256[512];
extern const float32_t twiddleCoef_512[1024];
extern const float32_t twiddleCoef_1024[2048];
extern const float32_t twiddleCoef_2048[4096];
extern const float32_t twiddleCoef_4096[8192];
#define twiddleCoef twiddleCoef_4096
extern const q31_t twiddleCoefQ31[6144];
extern const q15_t twiddleCoefQ15[6144];
extern const float32_t twiddleCoef_rfft_32[32];
extern const float32_t twiddleCoef_rfft_64[64];
extern const float32_t twiddleCoef_rfft_128[128];
extern const float32_t twiddleCoef_rfft_256[256];
extern const float32_t twiddleCoef_rfft_512[512];
extern const float32_t twiddleCoef_rfft_1024[1024];
extern const float32_t twiddleCoef_rfft_2048[2048];
extern const float32_t twiddleCoef_rfft_4096[4096];
#define ARMBITREVINDEXTABLE__16_TABLE_LENGTH ((uint16_t)20 )
#define ARMBITREVINDEXTABLE__32_TABLE_LENGTH ((uint16_t)48 )
#define ARMBITREVINDEXTABLE__64_TABLE_LENGTH ((uint16_t)56 )
#define ARMBITREVINDEXTABLE_128_TABLE_LENGTH ((uint16_t)208 )
#define ARMBITREVINDEXTABLE_256_TABLE_LENGTH ((uint16_t)440 )
#define ARMBITREVINDEXTABLE_512_TABLE_LENGTH ((uint16_t)448 )
#define ARMBITREVINDEXTABLE1024_TABLE_LENGTH ((uint16_t)1800)
#define ARMBITREVINDEXTABLE2048_TABLE_LENGTH ((uint16_t)3808)
#define ARMBITREVINDEXTABLE4096_TABLE_LENGTH ((uint16_t)4032)
extern const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE__16_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE__32_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE__64_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE1024_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable2048[ARMBITREVINDEXTABLE2048_TABLE_LENGTH];
extern const uint16_t armBitRevIndexTable4096[ARMBITREVINDEXTABLE4096_TABLE_LENGTH];
/* Tables for Fast Math Sine and Cosine */
extern const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1];
extern const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE + 1];
extern const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE + 1];
#endif /* ARM_COMMON_TABLES_H */
================================================
FILE: firmware/system/include/cmsis/arm_const_structs.h
================================================
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2013 ARM Limited. All rights reserved.
*
* $Date: 16. October 2013
* $Revision: V1.4.2
*
* Project: CMSIS DSP Library
* Title: arm_const_structs.h
*
* Description: This file has constant structs that are initialized for
* user convenience. For example, some can be given as
* arguments to the arm_cfft_f32() function.
*
* Target Processor: Cortex-M4/Cortex-M3
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
#ifndef _ARM_CONST_STRUCTS_H
#define _ARM_CONST_STRUCTS_H
#include "arm_math.h"
#include "arm_common_tables.h"
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
#endif
================================================
FILE: firmware/system/include/cmsis/arm_math.h
================================================
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
* $Date: 20. February 2014
* $Revision: V1.4.2
*
* Project: CMSIS DSP Library
* Title: arm_math.h
*
* Description: Public header file for CMSIS DSP Library
*
* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
/**
\mainpage CMSIS DSP Software Library
*
* <b>Introduction</b>
*
* This user manual describes the CMSIS DSP software library,
* a suite of common signal processing functions for use on Cortex-M processor based devices.
*
* The library is divided into a number of functions each covering a specific category:
* - Basic math functions
* - Fast math functions
* - Complex math functions
* - Filters
* - Matrix functions
* - Transforms
* - Motor control functions
* - Statistical functions
* - Support functions
* - Interpolation functions
*
* The library has separate functions for operating on 8-bit integers, 16-bit integers,
* 32-bit integer and 32-bit floating-point values.
*
* <b>Using the Library</b>
*
* The library installer contains prebuilt versions of the libraries in the <code>Lib</code> folder.
* - arm_cortexM4lf_math.lib (Little endian and Floating Point Unit on Cortex-M4)
* - arm_cortexM4bf_math.lib (Big endian and Floating Point Unit on Cortex-M4)
* - arm_cortexM4l_math.lib (Little endian on Cortex-M4)
* - arm_cortexM4b_math.lib (Big endian on Cortex-M4)
* - arm_cortexM3l_math.lib (Little endian on Cortex-M3)
* - arm_cortexM3b_math.lib (Big endian on Cortex-M3)
* - arm_cortexM0l_math.lib (Little endian on Cortex-M0)
* - arm_cortexM0b_math.lib (Big endian on Cortex-M3)
*
* The library functions are declared in the public file <code>arm_math.h</code> which is placed in the <code>Include</code> folder.
* Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single
* public header file <code> arm_math.h</code> for Cortex-M4/M3/M0 with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.
* Define the appropriate pre processor MACRO ARM_MATH_CM4 or ARM_MATH_CM3 or
* ARM_MATH_CM0 or ARM_MATH_CM0PLUS depending on the target processor in the application.
*
* <b>Examples</b>
*
* The library ships with a number of examples which demonstrate how to use the library functions.
*
* <b>Toolchain Support</b>
*
* The library has been developed and tested with MDK-ARM version 4.60.
* The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.
*
* <b>Building the Library</b>
*
* The library installer contains a project file to re build libraries on MDK-ARM Tool chain in the <code>CMSIS\\DSP_Lib\\Source\\ARM</code> folder.
* - arm_cortexM_math.uvproj
*
*
* The libraries can be built by opening the arm_cortexM_math.uvproj project in MDK-ARM, selecting a specific target, and defining the optional pre processor MACROs detailed above.
*
* <b>Pre-processor Macros</b>
*
* Each library project have differant pre-processor macros.
*
* - UNALIGNED_SUPPORT_DISABLE:
*
* Define macro UNALIGNED_SUPPORT_DISABLE, If the silicon does not support unaligned memory access
*
* - ARM_MATH_BIG_ENDIAN:
*
* Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
*
* - ARM_MATH_MATRIX_CHECK:
*
* Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
*
* - ARM_MATH_ROUNDING:
*
* Define macro ARM_MATH_ROUNDING for rounding on support functions
*
* - ARM_MATH_CMx:
*
* Define macro ARM_MATH_CM4 for building the library on Cortex-M4 target, ARM_MATH_CM3 for building library on Cortex-M3 target
* and ARM_MATH_CM0 for building library on cortex-M0 target, ARM_MATH_CM0PLUS for building library on cortex-M0+ target.
*
* - __FPU_PRESENT:
*
* Initialize macro __FPU_PRESENT = 1 when building on FPU supported Targets. Enable this macro for M4bf and M4lf libraries
*
* <b>Copyright Notice</b>
*
* Copyright (C) 2010-2013 ARM Limited. All rights reserved.
*/
/**
* @defgroup groupMath Basic Math Functions
*/
/**
* @defgroup groupFastMath Fast Math Functions
* This set of functions provides a fast approximation to sine, cosine, and square root.
* As compared to most of the other functions in the CMSIS math library, the fast math functions
* operate on individual values and not arrays.
* There are separate functions for Q15, Q31, and floating-point data.
*
*/
/**
* @defgroup groupCmplxMath Complex Math Functions
* This set of functions operates on complex data vectors.
* The data in the complex arrays is stored in an interleaved fashion
* (real, imag,
gitextract_di5jfrul/
├── .gitignore
├── LICENSE
├── README.md
├── firmware/
│ ├── .cproject
│ ├── .project
│ ├── include/
│ │ └── stm32f10x_conf.h
│ ├── ldscripts/
│ │ ├── libs.ld
│ │ ├── mem.ld
│ │ └── sections.ld
│ ├── src/
│ │ ├── adc.c
│ │ ├── adc.h
│ │ ├── configuration.c
│ │ ├── configuration.h
│ │ ├── eeprom.c
│ │ ├── eeprom.h
│ │ ├── encoder.c
│ │ ├── encoder.h
│ │ ├── hall.c
│ │ ├── hall.h
│ │ ├── input.c
│ │ ├── input.h
│ │ ├── main.c
│ │ ├── pid.c
│ │ ├── pid.h
│ │ ├── pwm.c
│ │ ├── pwm.h
│ │ ├── usart.c
│ │ ├── usart.h
│ │ ├── utils.c
│ │ └── utils.h
│ └── system/
│ ├── include/
│ │ ├── arm/
│ │ │ └── semihosting.h
│ │ ├── cmsis/
│ │ │ ├── README_CMSIS.txt
│ │ │ ├── README_DEVICE.txt
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_const_structs.h
│ │ │ ├── arm_math.h
│ │ │ ├── cmsis_device.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm0plus.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ ├── core_cmInstr.h
│ │ │ ├── core_sc000.h
│ │ │ ├── core_sc300.h
│ │ │ ├── stm32f10x.h
│ │ │ └── system_stm32f10x.h
│ │ ├── cortexm/
│ │ │ └── ExceptionHandlers.h
│ │ ├── diag/
│ │ │ └── Trace.h
│ │ └── stm32f1-stdperiph/
│ │ ├── README_STDPERIPH.txt
│ │ ├── misc.h
│ │ ├── stm32f10x_adc.h
│ │ ├── stm32f10x_bkp.h
│ │ ├── stm32f10x_can.h
│ │ ├── stm32f10x_cec.h
│ │ ├── stm32f10x_crc.h
│ │ ├── stm32f10x_dac.h
│ │ ├── stm32f10x_dbgmcu.h
│ │ ├── stm32f10x_dma.h
│ │ ├── stm32f10x_exti.h
│ │ ├── stm32f10x_flash.h
│ │ ├── stm32f10x_fsmc.h
│ │ ├── stm32f10x_gpio.h
│ │ ├── stm32f10x_i2c.h
│ │ ├── stm32f10x_iwdg.h
│ │ ├── stm32f10x_pwr.h
│ │ ├── stm32f10x_rcc.h
│ │ ├── stm32f10x_rtc.h
│ │ ├── stm32f10x_sdio.h
│ │ ├── stm32f10x_spi.h
│ │ ├── stm32f10x_tim.h
│ │ ├── stm32f10x_usart.h
│ │ └── stm32f10x_wwdg.h
│ └── src/
│ ├── cmsis/
│ │ ├── README_DEVICE.txt
│ │ ├── system_stm32f10x.c
│ │ └── vectors_stm32f10x.c
│ ├── cortexm/
│ │ ├── _initialize_hardware.c
│ │ ├── _reset_hardware.c
│ │ └── exception_handlers.c
│ ├── diag/
│ │ ├── Trace.c
│ │ └── trace_impl.c
│ ├── newlib/
│ │ ├── README.txt
│ │ ├── _cxx.cpp
│ │ ├── _exit.c
│ │ ├── _sbrk.c
│ │ ├── _startup.c
│ │ ├── _syscalls.c
│ │ ├── _write.c
│ │ └── assert.c
│ └── stm32f1-stdperiph/
│ ├── README_STDPERIPH.txt
│ ├── misc.c
│ ├── stm32f10x_adc.c
│ ├── stm32f10x_bkp.c
│ ├── stm32f10x_can.c
│ ├── stm32f10x_cec.c
│ ├── stm32f10x_crc.c
│ ├── stm32f10x_dac.c
│ ├── stm32f10x_dbgmcu.c
│ ├── stm32f10x_dma.c
│ ├── stm32f10x_exti.c
│ ├── stm32f10x_flash.c
│ ├── stm32f10x_fsmc.c
│ ├── stm32f10x_gpio.c
│ ├── stm32f10x_i2c.c
│ ├── stm32f10x_iwdg.c
│ ├── stm32f10x_pwr.c
│ ├── stm32f10x_rcc.c
│ ├── stm32f10x_rtc.c
│ ├── stm32f10x_sdio.c
│ ├── stm32f10x_spi.c
│ ├── stm32f10x_tim.c
│ ├── stm32f10x_usart.c
│ └── stm32f10x_wwdg.c
├── gui/
│ ├── ServoGui.py
│ ├── __init__.py
│ └── servogui.nja
└── hardware/
├── bldc_control_v2/
│ ├── bldc_control_ver2.kicad_pcb
│ ├── bldc_control_ver2.net
│ ├── bldc_control_ver2.pro
│ └── bldc_control_ver2.sch
├── bldc_control_v3/
│ ├── bldc_control_ver3.kicad_pcb
│ ├── bldc_control_ver3.net
│ ├── bldc_control_ver3.pro
│ └── bldc_control_ver3.sch
├── bldc_drive_v2/
│ ├── Alu_casing.kicad_pcb
│ ├── Alu_casing.pro
│ ├── bldc_drive.kicad_pcb
│ ├── bldc_drive.net
│ ├── bldc_drive.pro
│ └── bldc_drive.sch
└── libraries/
├── 6n137.bck
├── 6n137.dcm
├── 6n137.lib
├── INA270.lib
├── custom_7805.dcm
├── custom_7805.lib
└── vias.pretty/
└── Via-0.6mm.kicad_mod
SYMBOL INDEX (1161 symbols across 79 files)
FILE: firmware/src/adc.c
function initADC (line 34) | void initADC()
function ADC1_2_IRQHandler (line 119) | void ADC1_2_IRQHandler(void) {
function DMA1_Channel1_IRQHandler (line 129) | void DMA1_Channel1_IRQHandler(void) {
FILE: firmware/src/configuration.c
function writeConfig (line 29) | void writeConfig()
function getConfig (line 49) | void getConfig()
function setConfig (line 96) | void setConfig(char* param, int16_t value)
function printConfiguration (line 198) | void printConfiguration()
FILE: firmware/src/configuration.h
type servoConfig (line 64) | typedef struct {
FILE: firmware/src/eeprom.c
function EE_Init (line 52) | uint16_t EE_Init(void)
function EE_ReadVariable (line 267) | uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data)
function EE_WriteVariable (line 326) | uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data)
function FLASH_Status (line 350) | static FLASH_Status EE_Format(void)
function EE_FindValidPage (line 388) | static uint16_t EE_FindValidPage(uint8_t Operation)
function EE_VerifyPageFullWriteVariable (line 460) | static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uin...
function EE_PageTransfer (line 521) | static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data)
FILE: firmware/src/encoder.c
function buildCommutationTable (line 50) | void buildCommutationTable()
function forcedInitialization (line 70) | void forcedInitialization()
function forcedInitialization (line 108) | void forcedInitialization()
function initEncoder (line 157) | void initEncoder()
function getEncoderCount (line 237) | void getEncoderCount()
function getCommutationPos (line 259) | uint16_t getCommutationPos(uint8_t phase)
FILE: firmware/src/hall.c
function initHALL (line 31) | void initHALL()
function TIM4_IRQHandler (line 101) | void TIM4_IRQHandler(void) {
FILE: firmware/src/input.c
function initLeds (line 36) | void initLeds()
function initStepDirInput (line 57) | void initStepDirInput()
function EXTI9_5_IRQHandler (line 109) | void EXTI9_5_IRQHandler()
function initPWMInput (line 164) | void initPWMInput()
function TIM3_IRQHandler (line 242) | void TIM3_IRQHandler(void) {
FILE: firmware/src/main.c
function main (line 47) | int main() {
FILE: firmware/src/pid.c
function initPid (line 42) | void initPid()
function updatePid (line 70) | void updatePid()
FILE: firmware/src/pwm.c
function initPWM (line 65) | void initPWM()
function TIM1_CC_IRQHandler (line 154) | void TIM1_CC_IRQHandler(void)
function pwm_setDutyCycle (line 166) | void pwm_setDutyCycle()
function pwm_setDutyCycle (line 192) | void pwm_setDutyCycle()
function pwm_motorStart (line 212) | void pwm_motorStart()
function pwm_motorStop (line 234) | void pwm_motorStop()
function pwm_InitialBLDCCommutation (line 254) | void pwm_InitialBLDCCommutation()
function pwm_Commute (line 277) | void pwm_Commute(uint8_t comm_pos)
function UpdatePWMChannels (line 306) | void UpdatePWMChannels(uint8_t BL1,uint8_t BL2,uint8_t BL3,uint8_t BH1,u...
FILE: firmware/src/usart.c
function initUSART (line 42) | void initUSART(uint16_t baud)
function usart_startDMA (line 132) | void usart_startDMA(uint16_t len)
function usart_sendChar (line 144) | void usart_sendChar(char chr)
function usart_sendStr (line 150) | void usart_sendStr(char *str)
function usart_send_stream (line 158) | void usart_send_stream()
function parseUsart (line 174) | void parseUsart()
function serialInterrupt (line 225) | void serialInterrupt()
function USART3_IRQHandler (line 248) | void USART3_IRQHandler(void)
function USART1_IRQHandler (line 255) | void USART1_IRQHandler(void)
FILE: firmware/src/utils.c
function systickInit (line 29) | void systickInit (uint16_t frequency)
function SysTick_Handler (line 37) | void SysTick_Handler (void)
function millis (line 42) | uint32_t millis (void)
function delay_ms (line 47) | void delay_ms (uint32_t t)
FILE: firmware/system/include/arm/semihosting.h
type OperationNumber (line 12) | enum OperationNumber
function call_host (line 66) | static inline int
function report_exception (line 95) | static inline void
FILE: firmware/system/include/cmsis/arm_math.h
type arm_status (line 333) | typedef enum
type q7_t (line 347) | typedef int8_t q7_t;
type q15_t (line 352) | typedef int16_t q15_t;
type q31_t (line 357) | typedef int32_t q31_t;
type q63_t (line 362) | typedef int64_t q63_t;
type float32_t (line 367) | typedef float float32_t;
type float64_t (line 372) | typedef double float64_t;
function __INLINE (line 434) | static __INLINE q31_t clip_q63_to_q31(
function __INLINE (line 444) | static __INLINE q15_t clip_q63_to_q15(
function __INLINE (line 454) | static __INLINE q7_t clip_q31_to_q7(
function __INLINE (line 464) | static __INLINE q15_t clip_q31_to_q15(
function __INLINE (line 475) | static __INLINE q63_t mult32x64(
function __INLINE (line 494) | static __INLINE uint32_t __CLZ(
function __INLINE (line 516) | static __INLINE uint32_t arm_recip_q31(
function __INLINE (line 567) | static __INLINE uint32_t arm_recip_q15(
function __INLINE (line 620) | static __INLINE q31_t __SSAT(
function __INLINE (line 668) | static __INLINE q31_t __QADD8(
function __INLINE (line 695) | static __INLINE q31_t __QSUB8(
function __INLINE (line 725) | static __INLINE q31_t __QADD16(
function __INLINE (line 748) | static __INLINE q31_t __SHADD16(
function __INLINE (line 771) | static __INLINE q31_t __QSUB16(
function __INLINE (line 793) | static __INLINE q31_t __SHSUB16(
function __INLINE (line 815) | static __INLINE q31_t __QASX(
function __INLINE (line 833) | static __INLINE q31_t __SHASX(
function __INLINE (line 856) | static __INLINE q31_t __QSAX(
function __INLINE (line 874) | static __INLINE q31_t __SHSAX(
function __INLINE (line 896) | static __INLINE q31_t __SMUSDX(
function __INLINE (line 908) | static __INLINE q31_t __SMUADX(
function __INLINE (line 920) | static __INLINE q31_t __QADD(
function __INLINE (line 930) | static __INLINE q31_t __QSUB(
function __INLINE (line 940) | static __INLINE q31_t __SMLAD(
function __INLINE (line 953) | static __INLINE q31_t __SMLADX(
function __INLINE (line 966) | static __INLINE q31_t __SMLSDX(
function __INLINE (line 979) | static __INLINE q63_t __SMLALD(
function __INLINE (line 992) | static __INLINE q63_t __SMLALDX(
function __INLINE (line 1005) | static __INLINE q31_t __SMUAD(
function __INLINE (line 1017) | static __INLINE q31_t __SMUSD(
function __INLINE (line 1030) | static __INLINE q31_t __SXTB16(
type arm_fir_instance_q7 (line 1045) | typedef struct
type arm_fir_instance_q15 (line 1055) | typedef struct
type arm_fir_instance_q31 (line 1065) | typedef struct
type arm_fir_instance_f32 (line 1075) | typedef struct
type arm_biquad_casd_df1_inst_q15 (line 1239) | typedef struct
type arm_biquad_casd_df1_inst_q31 (line 1252) | typedef struct
type arm_biquad_casd_df1_inst_f32 (line 1264) | typedef struct
type arm_matrix_instance_f32 (line 1406) | typedef struct
type arm_matrix_instance_q15 (line 1417) | typedef struct
type arm_matrix_instance_q31 (line 1429) | typedef struct
type arm_pid_instance_q15 (line 1777) | typedef struct
type arm_pid_instance_q31 (line 1795) | typedef struct
type arm_pid_instance_f32 (line 1810) | typedef struct
type arm_linear_interp_instance_f32 (line 1884) | typedef struct
type arm_bilinear_interp_instance_f32 (line 1896) | typedef struct
type arm_bilinear_interp_instance_q31 (line 1907) | typedef struct
type arm_bilinear_interp_instance_q15 (line 1918) | typedef struct
type arm_bilinear_interp_instance_q7 (line 1929) | typedef struct
type arm_cfft_radix2_instance_q15 (line 2006) | typedef struct
type arm_cfft_radix4_instance_q15 (line 2033) | typedef struct
type arm_cfft_radix2_instance_q31 (line 2058) | typedef struct
type arm_cfft_radix4_instance_q31 (line 2083) | typedef struct
type arm_cfft_radix2_instance_f32 (line 2108) | typedef struct
type arm_cfft_radix4_instance_f32 (line 2136) | typedef struct
type arm_cfft_instance_f32 (line 2164) | typedef struct
type arm_rfft_instance_q15 (line 2182) | typedef struct
type arm_rfft_instance_q31 (line 2210) | typedef struct
type arm_rfft_instance_f32 (line 2238) | typedef struct
type arm_rfft_fast_instance_f32 (line 2266) | typedef struct
type arm_dct4_instance_f32 (line 2286) | typedef struct
type arm_dct4_instance_q31 (line 2333) | typedef struct
type arm_dct4_instance_q15 (line 2380) | typedef struct
type arm_fir_decimate_instance_q15 (line 3359) | typedef struct
type arm_fir_decimate_instance_q31 (line 3371) | typedef struct
type arm_fir_decimate_instance_f32 (line 3384) | typedef struct
type arm_fir_interpolate_instance_q15 (line 3540) | typedef struct
type arm_fir_interpolate_instance_q31 (line 3552) | typedef struct
type arm_fir_interpolate_instance_f32 (line 3564) | typedef struct
type arm_biquad_cas_df1_32x64_ins_q31 (line 3684) | typedef struct
type arm_biquad_cascade_df2T_instance_f32 (line 3731) | typedef struct
type arm_fir_lattice_instance_q15 (line 3776) | typedef struct
type arm_fir_lattice_instance_q31 (line 3787) | typedef struct
type arm_fir_lattice_instance_f32 (line 3798) | typedef struct
type arm_iir_lattice_instance_q15 (line 3899) | typedef struct
type arm_iir_lattice_instance_q31 (line 3910) | typedef struct
type arm_iir_lattice_instance_f32 (line 3921) | typedef struct
type arm_lms_instance_f32 (line 4039) | typedef struct
type arm_lms_instance_q15 (line 4089) | typedef struct
type arm_lms_instance_q31 (line 4144) | typedef struct
type arm_lms_norm_instance_f32 (line 4198) | typedef struct
type arm_lms_norm_instance_q31 (line 4250) | typedef struct
type arm_lms_norm_instance_q15 (line 4306) | typedef struct
type arm_fir_sparse_instance_f32 (line 4530) | typedef struct
type arm_fir_sparse_instance_q31 (line 4544) | typedef struct
type arm_fir_sparse_instance_q15 (line 4558) | typedef struct
type arm_fir_sparse_instance_q7 (line 4572) | typedef struct
function __INLINE (line 4922) | static __INLINE float32_t arm_pid_f32(
function __INLINE (line 4957) | static __INLINE q31_t arm_pid_q31(
function __INLINE (line 5005) | static __INLINE q15_t arm_pid_q15(
function __INLINE (line 5111) | static __INLINE void arm_clarke_f32(
function __INLINE (line 5141) | static __INLINE void arm_clarke_q31(
function __INLINE (line 5216) | static __INLINE void arm_inv_clarke_f32(
function __INLINE (line 5245) | static __INLINE void arm_inv_clarke_q31(
function __INLINE (line 5332) | static __INLINE void arm_park_f32(
function __INLINE (line 5366) | static __INLINE void arm_park_q31(
function __INLINE (line 5451) | static __INLINE void arm_inv_park_f32(
function __INLINE (line 5486) | static __INLINE void arm_inv_park_q31(
function __INLINE (line 5584) | static __INLINE float32_t arm_linear_interp_f32(
function __INLINE (line 5643) | static __INLINE q31_t arm_linear_interp_q31(
function __INLINE (line 5705) | static __INLINE q15_t arm_linear_interp_q15(
function __INLINE (line 5765) | static __INLINE q7_t arm_linear_interp_q7(
function __INLINE (line 5910) | static __INLINE arm_status arm_sqrt_f32(
function __INLINE (line 5970) | static __INLINE void arm_circularWrite_f32(
function __INLINE (line 6015) | static __INLINE void arm_circularRead_f32(
function __INLINE (line 6070) | static __INLINE void arm_circularWrite_q15(
function __INLINE (line 6115) | static __INLINE void arm_circularRead_q15(
function __INLINE (line 6172) | static __INLINE void arm_circularWrite_q7(
function __INLINE (line 6217) | static __INLINE void arm_circularRead_q7(
function __INLINE (line 6958) | static __INLINE float32_t arm_bilinear_interp_f32(
function __INLINE (line 7026) | static __INLINE q31_t arm_bilinear_interp_q31(
function __INLINE (line 7102) | static __INLINE q15_t arm_bilinear_interp_q15(
function __INLINE (line 7182) | static __INLINE q7_t arm_bilinear_interp_q7(
FILE: firmware/system/include/cmsis/core_cm0.h
type APSR_Type (line 223) | typedef union
type IPSR_Type (line 246) | typedef union
type xPSR_Type (line 259) | typedef union
type CONTROL_Type (line 285) | typedef union
type NVIC_Type (line 308) | typedef struct
type SCB_Type (line 333) | typedef struct
type SysTick_Type (line 438) | typedef struct
function __STATIC_INLINE (line 543) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 555) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 571) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 583) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 595) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 610) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 632) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 646) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 684) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
FILE: firmware/system/include/cmsis/core_cm0plus.h
type APSR_Type (line 234) | typedef union
type IPSR_Type (line 257) | typedef union
type xPSR_Type (line 270) | typedef union
type CONTROL_Type (line 296) | typedef union
type NVIC_Type (line 319) | typedef struct
type SCB_Type (line 344) | typedef struct
type SysTick_Type (line 459) | typedef struct
type MPU_Type (line 509) | typedef struct
function __STATIC_INLINE (line 654) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 666) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 682) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 694) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 706) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 721) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 743) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 757) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 795) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
FILE: firmware/system/include/cmsis/core_cm3.h
type APSR_Type (line 230) | typedef union
type IPSR_Type (line 253) | typedef union
type xPSR_Type (line 266) | typedef union
type CONTROL_Type (line 292) | typedef union
type NVIC_Type (line 315) | typedef struct
type SCB_Type (line 347) | typedef struct
type SCnSCB_Type (line 572) | typedef struct
type SysTick_Type (line 609) | typedef struct
type DWT_Type (line 760) | typedef struct
type TPI_Type (line 905) | typedef struct
type MPU_Type (line 1059) | typedef struct
type CoreDebug_Type (line 1151) | typedef struct
function __STATIC_INLINE (line 1310) | __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
function __STATIC_INLINE (line 1330) | __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
function __STATIC_INLINE (line 1342) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1354) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1370) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1382) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1394) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1409) | __STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
function __STATIC_INLINE (line 1424) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 1444) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 1466) | __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, ui...
function __STATIC_INLINE (line 1494) | __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t Pr...
function __STATIC_INLINE (line 1512) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 1551) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
function __STATIC_INLINE (line 1591) | __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
function __STATIC_INLINE (line 1610) | __STATIC_INLINE int32_t ITM_ReceiveChar (void) {
function __STATIC_INLINE (line 1629) | __STATIC_INLINE int32_t ITM_CheckChar (void) {
FILE: firmware/system/include/cmsis/core_cm4.h
type APSR_Type (line 277) | typedef union
type IPSR_Type (line 300) | typedef union
type xPSR_Type (line 313) | typedef union
type CONTROL_Type (line 339) | typedef union
type NVIC_Type (line 362) | typedef struct
type SCB_Type (line 394) | typedef struct
type SCnSCB_Type (line 611) | typedef struct
type SysTick_Type (line 649) | typedef struct
type DWT_Type (line 800) | typedef struct
type TPI_Type (line 945) | typedef struct
type MPU_Type (line 1099) | typedef struct
type FPU_Type (line 1192) | typedef struct
type CoreDebug_Type (line 1297) | typedef struct
function __STATIC_INLINE (line 1461) | __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
function __STATIC_INLINE (line 1481) | __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
function __STATIC_INLINE (line 1493) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1506) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1522) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1534) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1546) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1561) | __STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
function __STATIC_INLINE (line 1576) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 1596) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 1618) | __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, ui...
function __STATIC_INLINE (line 1646) | __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t Pr...
function __STATIC_INLINE (line 1664) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 1703) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
function __STATIC_INLINE (line 1743) | __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
function __STATIC_INLINE (line 1762) | __STATIC_INLINE int32_t ITM_ReceiveChar (void) {
function __STATIC_INLINE (line 1781) | __STATIC_INLINE int32_t ITM_CheckChar (void) {
FILE: firmware/system/include/cmsis/core_cm4_simd.h
function __STATIC_INLINE (line 135) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD8(uint...
function __STATIC_INLINE (line 143) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD8(uint...
function __STATIC_INLINE (line 151) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD8(uin...
function __STATIC_INLINE (line 159) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD8(uint...
function __STATIC_INLINE (line 167) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD8(uin...
function __STATIC_INLINE (line 175) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD8(uin...
function __STATIC_INLINE (line 184) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB8(uint...
function __STATIC_INLINE (line 192) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB8(uint...
function __STATIC_INLINE (line 200) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB8(uin...
function __STATIC_INLINE (line 208) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB8(uint...
function __STATIC_INLINE (line 216) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB8(uin...
function __STATIC_INLINE (line 224) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB8(uin...
function __STATIC_INLINE (line 233) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD16(uin...
function __STATIC_INLINE (line 241) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD16(uin...
function __STATIC_INLINE (line 249) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD16(ui...
function __STATIC_INLINE (line 257) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD16(uin...
function __STATIC_INLINE (line 265) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD16(ui...
function __STATIC_INLINE (line 273) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD16(ui...
function __STATIC_INLINE (line 281) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB16(uin...
function __STATIC_INLINE (line 289) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB16(uin...
function __STATIC_INLINE (line 297) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB16(ui...
function __STATIC_INLINE (line 305) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB16(uin...
function __STATIC_INLINE (line 313) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB16(ui...
function __STATIC_INLINE (line 321) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB16(ui...
function __STATIC_INLINE (line 329) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SASX(uint3...
function __STATIC_INLINE (line 337) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QASX(uint3...
function __STATIC_INLINE (line 345) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHASX(uint...
function __STATIC_INLINE (line 353) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UASX(uint3...
function __STATIC_INLINE (line 361) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQASX(uint...
function __STATIC_INLINE (line 369) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHASX(uint...
function __STATIC_INLINE (line 377) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSAX(uint3...
function __STATIC_INLINE (line 385) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSAX(uint3...
function __STATIC_INLINE (line 393) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSAX(uint...
function __STATIC_INLINE (line 401) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAX(uint3...
function __STATIC_INLINE (line 409) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSAX(uint...
function __STATIC_INLINE (line 417) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSAX(uint...
function __STATIC_INLINE (line 425) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAD8(uint...
function __STATIC_INLINE (line 433) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USADA8(uin...
function __STATIC_INLINE (line 455) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTB16(uin...
function __STATIC_INLINE (line 463) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTAB16(ui...
function __STATIC_INLINE (line 471) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTB16(uin...
function __STATIC_INLINE (line 479) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTAB16(ui...
function __STATIC_INLINE (line 487) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUAD (ui...
function __STATIC_INLINE (line 495) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUADX (ui...
function __STATIC_INLINE (line 503) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLAD (uin...
function __STATIC_INLINE (line 511) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLADX (ui...
function __STATIC_INLINE (line 519) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLALD (ui...
function __STATIC_INLINE (line 536) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLALDX (u...
function __STATIC_INLINE (line 553) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSD (ui...
function __STATIC_INLINE (line 561) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSDX (ui...
function __STATIC_INLINE (line 569) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSD (uin...
function __STATIC_INLINE (line 577) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSDX (ui...
function __STATIC_INLINE (line 585) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLSLD (ui...
function __STATIC_INLINE (line 602) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLSLDX (u...
function __STATIC_INLINE (line 619) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SEL (uint...
function __STATIC_INLINE (line 627) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD(uint3...
function __STATIC_INLINE (line 635) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB(uint3...
function __STATIC_INLINE (line 660) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMMLA (int...
FILE: firmware/system/include/cmsis/core_cmFunc.h
function __STATIC_INLINE (line 64) | __STATIC_INLINE uint32_t __get_CONTROL(void)
function __STATIC_INLINE (line 77) | __STATIC_INLINE void __set_CONTROL(uint32_t control)
function __STATIC_INLINE (line 90) | __STATIC_INLINE uint32_t __get_IPSR(void)
function __STATIC_INLINE (line 103) | __STATIC_INLINE uint32_t __get_APSR(void)
function __STATIC_INLINE (line 116) | __STATIC_INLINE uint32_t __get_xPSR(void)
function __STATIC_INLINE (line 129) | __STATIC_INLINE uint32_t __get_PSP(void)
function __STATIC_INLINE (line 142) | __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
function __STATIC_INLINE (line 155) | __STATIC_INLINE uint32_t __get_MSP(void)
function __STATIC_INLINE (line 168) | __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
function __STATIC_INLINE (line 181) | __STATIC_INLINE uint32_t __get_PRIMASK(void)
function __STATIC_INLINE (line 194) | __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
function __STATIC_INLINE (line 225) | __STATIC_INLINE uint32_t __get_BASEPRI(void)
function __STATIC_INLINE (line 238) | __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
function __STATIC_INLINE (line 251) | __STATIC_INLINE uint32_t __get_FAULTMASK(void)
function __STATIC_INLINE (line 264) | __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
function __STATIC_INLINE (line 281) | __STATIC_INLINE uint32_t __get_FPSCR(void)
function __STATIC_INLINE (line 298) | __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
function __STATIC_INLINE (line 340) | __STATIC_INLINE uint32_t __get_CONTROL(void)
function __STATIC_INLINE (line 355) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CONTROL(ui...
function __STATIC_INLINE (line 367) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(v...
function __STATIC_INLINE (line 382) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(v...
function __STATIC_INLINE (line 397) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(v...
function __STATIC_INLINE (line 412) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
function __STATIC_INLINE (line 427) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32...
function __STATIC_INLINE (line 439) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
function __STATIC_INLINE (line 454) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32...
function __STATIC_INLINE (line 466) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMAS...
function __STATIC_INLINE (line 481) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(ui...
function __STATIC_INLINE (line 517) | __STATIC_INLINE uint32_t __get_BASEPRI(void)
function __STATIC_INLINE (line 532) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI(ui...
function __STATIC_INLINE (line 544) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FAULTM...
function __STATIC_INLINE (line 559) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FAULTMASK(...
function __STATIC_INLINE (line 575) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(...
function __STATIC_INLINE (line 597) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint...
FILE: firmware/system/include/cmsis/core_cmInstr.h
function __REV16 (line 129) | uint32_t __REV16(uint32_t value)
function __REVSH (line 144) | int32_t __REVSH(int32_t value)
function __STATIC_INLINE (line 312) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __NOP(void)
function __STATIC_INLINE (line 323) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __WFI(void)
function __STATIC_INLINE (line 334) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __WFE(void)
function __STATIC_INLINE (line 344) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __SEV(void)
function __STATIC_INLINE (line 356) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __ISB(void)
function __STATIC_INLINE (line 367) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __DSB(void)
function __STATIC_INLINE (line 378) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __DMB(void)
function __STATIC_INLINE (line 391) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV(uint32...
function __STATIC_INLINE (line 411) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV16(uint...
function __STATIC_INLINE (line 427) | __attribute__( ( always_inline ) ) __STATIC_INLINE int32_t __REVSH(int32...
function __STATIC_INLINE (line 448) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __ROR(uint32...
function __STATIC_INLINE (line 474) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __RBIT(uint3...
function __STATIC_INLINE (line 490) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __LDREXB(vola...
function __STATIC_INLINE (line 513) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint16_t __LDREXH(vol...
function __STATIC_INLINE (line 536) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __LDREXW(vol...
function __STATIC_INLINE (line 554) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXB(uin...
function __STATIC_INLINE (line 572) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXH(uin...
function __STATIC_INLINE (line 590) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXW(uin...
function __STATIC_INLINE (line 604) | __attribute__( ( always_inline ) ) __STATIC_INLINE void __CLREX(void)
function __STATIC_INLINE (line 649) | __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __CLZ(uint32_...
FILE: firmware/system/include/cmsis/core_sc000.h
type APSR_Type (line 221) | typedef union
type IPSR_Type (line 244) | typedef union
type xPSR_Type (line 257) | typedef union
type CONTROL_Type (line 283) | typedef union
type NVIC_Type (line 306) | typedef struct
type SCB_Type (line 331) | typedef struct
type SCnSCB_Type (line 449) | typedef struct
type SysTick_Type (line 470) | typedef struct
type MPU_Type (line 520) | typedef struct
function __STATIC_INLINE (line 666) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 678) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 694) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 706) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 718) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 733) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 755) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 769) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 807) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
FILE: firmware/system/include/cmsis/core_sc300.h
type APSR_Type (line 222) | typedef union
type IPSR_Type (line 245) | typedef union
type xPSR_Type (line 258) | typedef union
type CONTROL_Type (line 284) | typedef union
type NVIC_Type (line 307) | typedef struct
type SCB_Type (line 339) | typedef struct
type SCnSCB_Type (line 559) | typedef struct
type SysTick_Type (line 581) | typedef struct
type DWT_Type (line 732) | typedef struct
type TPI_Type (line 877) | typedef struct
type MPU_Type (line 1031) | typedef struct
type CoreDebug_Type (line 1123) | typedef struct
function __STATIC_INLINE (line 1282) | __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
function __STATIC_INLINE (line 1302) | __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
function __STATIC_INLINE (line 1314) | __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1326) | __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1342) | __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1354) | __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1366) | __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
function __STATIC_INLINE (line 1381) | __STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
function __STATIC_INLINE (line 1396) | __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
function __STATIC_INLINE (line 1416) | __STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
function __STATIC_INLINE (line 1438) | __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, ui...
function __STATIC_INLINE (line 1466) | __STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t Pr...
function __STATIC_INLINE (line 1484) | __STATIC_INLINE void NVIC_SystemReset(void)
function __STATIC_INLINE (line 1523) | __STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
function __STATIC_INLINE (line 1563) | __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
function __STATIC_INLINE (line 1582) | __STATIC_INLINE int32_t ITM_ReceiveChar (void) {
function __STATIC_INLINE (line 1601) | __STATIC_INLINE int32_t ITM_CheckChar (void) {
FILE: firmware/system/include/cmsis/stm32f10x.h
type IRQn_Type (line 167) | typedef enum IRQn
type s32 (line 487) | typedef int32_t s32;
type s16 (line 488) | typedef int16_t s16;
type s8 (line 489) | typedef int8_t s8;
type sc32 (line 491) | typedef const int32_t sc32;
type sc16 (line 492) | typedef const int16_t sc16;
type sc8 (line 493) | typedef const int8_t sc8;
type __IO (line 495) | typedef __IO int32_t vs32;
type __IO (line 496) | typedef __IO int16_t vs16;
type __IO (line 497) | typedef __IO int8_t vs8;
type __I (line 499) | typedef __I int32_t vsc32;
type __I (line 500) | typedef __I int16_t vsc16;
type __I (line 501) | typedef __I int8_t vsc8;
type u32 (line 503) | typedef uint32_t u32;
type u16 (line 504) | typedef uint16_t u16;
type u8 (line 505) | typedef uint8_t u8;
type uc32 (line 507) | typedef const uint32_t uc32;
type uc16 (line 508) | typedef const uint16_t uc16;
type uc8 (line 509) | typedef const uint8_t uc8;
type __IO (line 511) | typedef __IO uint32_t vu32;
type __IO (line 512) | typedef __IO uint16_t vu16;
type __IO (line 513) | typedef __IO uint8_t vu8;
type __I (line 515) | typedef __I uint32_t vuc32;
type __I (line 516) | typedef __I uint16_t vuc16;
type __I (line 517) | typedef __I uint8_t vuc8;
type FlagStatus (line 519) | typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
type FunctionalState (line 521) | typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
type ErrorStatus (line 524) | typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
type ADC_TypeDef (line 542) | typedef struct
type BKP_TypeDef (line 570) | typedef struct
type CAN_TxMailBox_TypeDef (line 669) | typedef struct
type CAN_FIFOMailBox_TypeDef (line 681) | typedef struct
type CAN_FilterRegister_TypeDef (line 693) | typedef struct
type CAN_TypeDef (line 703) | typedef struct
type CEC_TypeDef (line 736) | typedef struct
type CRC_TypeDef (line 751) | typedef struct
type DAC_TypeDef (line 764) | typedef struct
type DBGMCU_TypeDef (line 788) | typedef struct
type DMA_Channel_TypeDef (line 798) | typedef struct
type DMA_TypeDef (line 806) | typedef struct
type ETH_TypeDef (line 816) | typedef struct
type EXTI_TypeDef (line 887) | typedef struct
type FLASH_TypeDef (line 901) | typedef struct
type OB_TypeDef (line 926) | typedef struct
type FSMC_Bank1_TypeDef (line 942) | typedef struct
type FSMC_Bank1E_TypeDef (line 951) | typedef struct
type FSMC_Bank2_TypeDef (line 960) | typedef struct
type FSMC_Bank3_TypeDef (line 974) | typedef struct
type FSMC_Bank4_TypeDef (line 988) | typedef struct
type GPIO_TypeDef (line 1001) | typedef struct
type AFIO_TypeDef (line 1016) | typedef struct
type I2C_TypeDef (line 1028) | typedef struct
type IWDG_TypeDef (line 1054) | typedef struct
type PWR_TypeDef (line 1066) | typedef struct
type RCC_TypeDef (line 1076) | typedef struct
type RTC_TypeDef (line 1104) | typedef struct
type SDIO_TypeDef (line 1132) | typedef struct
type SPI_TypeDef (line 1160) | typedef struct
type TIM_TypeDef (line 1186) | typedef struct
type USART_TypeDef (line 1234) | typedef struct
type WWDG_TypeDef (line 1256) | typedef struct
FILE: firmware/system/include/diag/Trace.h
function trace_initialize (line 99) | inline void
function trace_write (line 106) | inline ssize_t
function trace_printf (line 114) | inline int
function trace_puts (line 121) | inline int
function trace_putchar (line 128) | inline int
function trace_dump_args (line 135) | inline void
FILE: firmware/system/include/stm32f1-stdperiph/misc.h
type NVIC_InitTypeDef (line 50) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_adc.h
type ADC_InitTypeDef (line 56) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_can.h
type CAN_InitTypeDef (line 59) | typedef struct
type CAN_FilterInitTypeDef (line 112) | typedef struct
type CanTxMsg (line 151) | typedef struct
type CanRxMsg (line 179) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_cec.h
type CEC_InitTypeDef (line 50) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_dac.h
type DAC_InitTypeDef (line 50) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_dma.h
type DMA_InitTypeDef (line 50) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_exti.h
type EXTIMode_TypeDef (line 56) | typedef enum
type EXTITrigger_TypeDef (line 68) | typedef enum
type EXTI_InitTypeDef (line 82) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_flash.h
type FLASH_Status (line 50) | typedef enum
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_fsmc.h
type FSMC_NORSRAMTimingInitTypeDef (line 50) | typedef struct
type FSMC_NORSRAMInitTypeDef (line 92) | typedef struct
type FSMC_NAND_PCCARDTimingInitTypeDef (line 151) | typedef struct
type FSMC_NANDInitTypeDef (line 183) | typedef struct
type FSMC_PCCARDInitTypeDef (line 217) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_gpio.h
type GPIOSpeed_TypeDef (line 58) | typedef enum
type GPIOMode_TypeDef (line 71) | typedef enum
type GPIO_InitTypeDef (line 91) | typedef struct
type BitAction (line 108) | typedef enum
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_i2c.h
type I2C_InitTypeDef (line 56) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_rcc.h
type RCC_ClocksTypeDef (line 46) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_sdio.h
type SDIO_InitTypeDef (line 52) | typedef struct
type SDIO_CmdInitTypeDef (line 76) | typedef struct
type SDIO_DataInitTypeDef (line 96) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_spi.h
type SPI_InitTypeDef (line 56) | typedef struct
type I2S_InitTypeDef (line 93) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_tim.h
type TIM_TimeBaseInitTypeDef (line 57) | typedef struct
type TIM_OCInitTypeDef (line 86) | typedef struct
type TIM_ICInitTypeDef (line 121) | typedef struct
type TIM_BDTRInitTypeDef (line 145) | typedef struct
FILE: firmware/system/include/stm32f1-stdperiph/stm32f10x_usart.h
type USART_InitTypeDef (line 56) | typedef struct
type USART_ClockInitTypeDef (line 88) | typedef struct
FILE: firmware/system/src/cmsis/system_stm32f10x.c
function SystemInit (line 212) | void SystemInit (void)
function SystemCoreClockUpdate (line 306) | void SystemCoreClockUpdate (void)
function SetSysClock (line 419) | static void SetSysClock(void)
function SystemInit_ExtMemCtl (line 455) | void SystemInit_ExtMemCtl(void)
function SetSysClockToHSE (line 500) | static void SetSysClockToHSE(void)
function SetSysClockTo24 (line 579) | static void SetSysClockTo24(void)
function SetSysClockTo36 (line 683) | static void SetSysClockTo36(void)
function SetSysClockTo48 (line 784) | static void SetSysClockTo48(void)
function SetSysClockTo56 (line 885) | static void SetSysClockTo56(void)
function SetSysClockTo72 (line 987) | static void SetSysClockTo72(void)
FILE: firmware/system/src/cmsis/vectors_stm32f10x.c
function Default_Handler (line 881) | void __attribute__ ((section(".after_vectors")))
FILE: firmware/system/src/cortexm/_initialize_hardware.c
function __initialize_hardware (line 30) | void
FILE: firmware/system/src/cortexm/_reset_hardware.c
function __reset_hardware (line 30) | void
FILE: firmware/system/src/cortexm/exception_handlers.c
function Reset_Handler (line 24) | void __attribute__ ((section(".after_vectors"),noreturn))
function Reset_Handler (line 33) | void __attribute__ ((section(".after_vectors"),naked))
function NMI_Handler (line 47) | void __attribute__ ((section(".after_vectors"),weak))
function HardFault_Handler (line 55) | void __attribute__ ((section(".after_vectors"),weak))
function MemManage_Handler (line 65) | void __attribute__ ((section(".after_vectors"),weak))
function BusFault_Handler (line 73) | void __attribute__ ((section(".after_vectors"),weak))
function UsageFault_Handler (line 81) | void __attribute__ ((section(".after_vectors"),weak))
function SVC_Handler (line 91) | void __attribute__ ((section(".after_vectors"),weak))
function DebugMon_Handler (line 101) | void __attribute__ ((section(".after_vectors"),weak))
function PendSV_Handler (line 111) | void __attribute__ ((section(".after_vectors"),weak))
function SysTick_Handler (line 119) | void __attribute__ ((section(".after_vectors"),weak))
FILE: firmware/system/src/diag/Trace.c
function trace_printf (line 21) | int
function trace_puts (line 45) | int
function trace_putchar (line 52) | int
function trace_dump_args (line 59) | void
FILE: firmware/system/src/diag/trace_impl.c
function trace_initialize (line 50) | void
function trace_write (line 61) | ssize_t
function _trace_write_itm (line 95) | static ssize_t
function _trace_write_semihosting_stdout (line 155) | static ssize_t
function _trace_write_semihosting_debug (line 214) | static ssize_t
FILE: firmware/system/src/newlib/_cxx.cpp
type __gnu_cxx (line 19) | namespace __gnu_cxx
function __verbose_terminate_handler (line 25) | void
function __cxa_pure_virtual (line 41) | void
FILE: firmware/system/src/newlib/_exit.c
function _exit (line 33) | void
function abort (line 48) | void
FILE: firmware/system/src/newlib/_sbrk.c
function caddr_t (line 21) | caddr_t
FILE: firmware/system/src/newlib/_startup.c
function __initialize_data (line 94) | inline void
function __initialize_bss (line 106) | inline void
function __run_init_array (line 132) | inline void
function __run_fini_array (line 154) | inline void
function _start (line 197) | void __attribute__ ((section(".after_vectors"),noreturn))
FILE: firmware/system/src/newlib/_syscalls.c
function __initialize_args (line 34) | void __attribute__((weak))
function raise (line 63) | int
function kill (line 73) | int
type stat (line 109) | struct stat
type timeval (line 115) | struct timeval
type stat (line 139) | struct stat
type tms (line 145) | struct tms
function _chown (line 158) | int __attribute__((weak))
function _close (line 166) | int __attribute__((weak))
function _execve (line 173) | int __attribute__((weak))
function _fork (line 181) | int __attribute__((weak))
function _fstat (line 188) | int __attribute__((weak))
function _getpid (line 196) | int __attribute__((weak))
function _gettimeofday (line 203) | int __attribute__((weak))
function _isatty (line 211) | int __attribute__((weak))
function _kill (line 218) | int __attribute__((weak))
function _link (line 225) | int __attribute__((weak))
function _lseek (line 233) | int __attribute__((weak))
function _open (line 241) | int __attribute__((weak))
function _read (line 249) | int __attribute__((weak))
function _readlink (line 257) | int __attribute__((weak))
function _stat (line 265) | int __attribute__((weak))
function _symlink (line 273) | int __attribute__((weak))
function clock_t (line 281) | clock_t __attribute__((weak))
function _unlink (line 288) | int __attribute__((weak))
function _wait (line 295) | int __attribute__((weak))
function _write (line 302) | int __attribute__((weak))
type tms (line 353) | struct tms
type timeval (line 355) | struct timeval
type stat (line 362) | struct stat
type stat (line 365) | struct stat
type stat (line 367) | struct stat
type CommandLineBlock (line 411) | typedef struct
function __initialize_args (line 417) | void
function _exit (line 507) | void
function _kill (line 521) | int __attribute__((weak))
type fdent (line 532) | struct fdent
type fdent (line 555) | struct fdent
type fdent (line 557) | struct fdent
type _reent (line 566) | struct _reent
type fdent (line 581) | struct fdent
function newslot (line 600) | static int
function initialise_monitor_handles (line 615) | void
function get_errno (line 662) | static int
function error (line 669) | static int
function checkerror (line 677) | static int
function _swiread (line 689) | int
function _read (line 704) | int
function _swilseek (line 730) | int
function _lseek (line 791) | int
function _swiwrite (line 799) | int
function _write (line 812) | int
function _swiopen (line 841) | int
function _open (line 906) | int
function _swiclose (line 913) | int
function _close (line 920) | int
function _getpid (line 950) | int __attribute__((weak))
function _swistat (line 956) | int
function _fstat (line 981) | int __attribute__((weak))
function _stat (line 988) | int __attribute__((weak))
function _link (line 1004) | int __attribute__((weak))
function _unlink (line 1011) | int
function _gettimeofday (line 1025) | int
function clock_t (line 1047) | clock_t
function clock_t (line 1057) | clock_t
function _isatty (line 1074) | int
function _system (line 1095) | int
function _rename (line 1122) | int
function mkdir (line 1136) | int
FILE: firmware/system/src/newlib/_write.c
function _write (line 29) | ssize_t
FILE: firmware/system/src/newlib/assert.c
function __assert_func (line 14) | void
function assert_failed (line 44) | void
FILE: firmware/system/src/stm32f1-stdperiph/misc.c
function NVIC_PriorityGroupConfig (line 96) | void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup)
function NVIC_Init (line 112) | void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct)
function NVIC_SetVectorTable (line 167) | void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset)
function NVIC_SystemLPConfig (line 186) | void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState)
function SysTick_CLKSourceConfig (line 210) | void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_adc.c
function ADC_DeInit (line 185) | void ADC_DeInit(ADC_TypeDef* ADCx)
function ADC_Init (line 224) | void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct)
function ADC_StructInit (line 281) | void ADC_StructInit(ADC_InitTypeDef* ADC_InitStruct)
function ADC_Cmd (line 305) | void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_DMACmd (line 330) | void ADC_DMACmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_ITConfig (line 359) | void ADC_ITConfig(ADC_TypeDef* ADCx, uint16_t ADC_IT, FunctionalState Ne...
function ADC_ResetCalibration (line 385) | void ADC_ResetCalibration(ADC_TypeDef* ADCx)
function FlagStatus (line 398) | FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
function ADC_StartCalibration (line 423) | void ADC_StartCalibration(ADC_TypeDef* ADCx)
function FlagStatus (line 436) | FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
function ADC_SoftwareStartConvCmd (line 463) | void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function FlagStatus (line 487) | FlagStatus ADC_GetSoftwareStartConvStatus(ADC_TypeDef* ADCx)
function ADC_DiscModeChannelCountConfig (line 515) | void ADC_DiscModeChannelCountConfig(ADC_TypeDef* ADCx, uint8_t Number)
function ADC_DiscModeCmd (line 542) | void ADC_DiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_RegularChannelConfig (line 596) | void ADC_RegularChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel, ui...
function ADC_ExternalTrigConvCmd (line 692) | void ADC_ExternalTrigConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_GetConversionValue (line 714) | uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
function ADC_GetDualModeConversionValue (line 726) | uint32_t ADC_GetDualModeConversionValue(void)
function ADC_AutoInjectedConvCmd (line 740) | void ADC_AutoInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_InjectedDiscModeCmd (line 766) | void ADC_InjectedDiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
function ADC_ExternalTrigInjectedConvConfig (line 805) | void ADC_ExternalTrigInjectedConvConfig(ADC_TypeDef* ADCx, uint32_t ADC_...
function ADC_ExternalTrigInjectedConvCmd (line 830) | void ADC_ExternalTrigInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState ...
function ADC_SoftwareStartInjectedConvCmd (line 855) | void ADC_SoftwareStartInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState...
function FlagStatus (line 879) | FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus(ADC_TypeDef* ADCx)
function ADC_InjectedChannelConfig (line 936) | void ADC_InjectedChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel, u...
function ADC_InjectedSequencerLengthConfig (line 999) | void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* ADCx, uint8_t Length)
function ADC_SetInjectedOffset (line 1031) | void ADC_SetInjectedOffset(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChanne...
function ADC_GetInjectedConversionValue (line 1058) | uint16_t ADC_GetInjectedConversionValue(ADC_TypeDef* ADCx, uint8_t ADC_I...
function ADC_AnalogWatchdogCmd (line 1088) | void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, uint32_t ADC_AnalogWatchdog)
function ADC_AnalogWatchdogThresholdsConfig (line 1113) | void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, uint16_t High...
function ADC_AnalogWatchdogSingleChannelConfig (line 1151) | void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, uint8_t AD...
function ADC_TempSensorVrefintCmd (line 1173) | void ADC_TempSensorVrefintCmd(FunctionalState NewState)
function FlagStatus (line 1201) | FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
function ADC_ClearFlag (line 1234) | void ADC_ClearFlag(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
function ITStatus (line 1253) | ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint16_t ADC_IT)
function ADC_ClearITPendingBit (line 1289) | void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, uint16_t ADC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_bkp.c
function BKP_DeInit (line 120) | void BKP_DeInit(void)
function BKP_TamperPinLevelConfig (line 134) | void BKP_TamperPinLevelConfig(uint16_t BKP_TamperPinLevel)
function BKP_TamperPinCmd (line 147) | void BKP_TamperPinCmd(FunctionalState NewState)
function BKP_ITConfig (line 160) | void BKP_ITConfig(FunctionalState NewState)
function BKP_RTCOutputConfig (line 180) | void BKP_RTCOutputConfig(uint16_t BKP_RTCOutputSource)
function BKP_SetRTCCalibrationValue (line 201) | void BKP_SetRTCCalibrationValue(uint8_t CalibrationValue)
function BKP_WriteBackupRegister (line 235) | void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data)
function BKP_ReadBackupRegister (line 254) | uint16_t BKP_ReadBackupRegister(uint16_t BKP_DR)
function FlagStatus (line 272) | FlagStatus BKP_GetFlagStatus(void)
function BKP_ClearFlag (line 282) | void BKP_ClearFlag(void)
function ITStatus (line 293) | ITStatus BKP_GetITStatus(void)
function BKP_ClearITPendingBit (line 303) | void BKP_ClearITPendingBit(void)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_can.c
function CAN_DeInit (line 122) | void CAN_DeInit(CAN_TypeDef* CANx)
function CAN_Init (line 154) | uint8_t CAN_Init(CAN_TypeDef* CANx, CAN_InitTypeDef* CAN_InitStruct)
function CAN_FilterInit (line 292) | void CAN_FilterInit(CAN_FilterInitTypeDef* CAN_FilterInitStruct)
function CAN_StructInit (line 384) | void CAN_StructInit(CAN_InitTypeDef* CAN_InitStruct)
function CAN_SlaveStartBank (line 428) | void CAN_SlaveStartBank(uint8_t CAN_BankNumber)
function CAN_DBGFreeze (line 451) | void CAN_DBGFreeze(CAN_TypeDef* CANx, FunctionalState NewState)
function CAN_TTComModeCmd (line 481) | void CAN_TTComModeCmd(CAN_TypeDef* CANx, FunctionalState NewState)
function CAN_Transmit (line 515) | uint8_t CAN_Transmit(CAN_TypeDef* CANx, CanTxMsg* TxMessage)
function CAN_TransmitStatus (line 589) | uint8_t CAN_TransmitStatus(CAN_TypeDef* CANx, uint8_t TransmitMailbox)
function CAN_CancelTransmit (line 643) | void CAN_CancelTransmit(CAN_TypeDef* CANx, uint8_t Mailbox)
function CAN_Receive (line 676) | void CAN_Receive(CAN_TypeDef* CANx, uint8_t FIFONumber, CanRxMsg* RxMess...
function CAN_FIFORelease (line 730) | void CAN_FIFORelease(CAN_TypeDef* CANx, uint8_t FIFONumber)
function CAN_MessagePending (line 753) | uint8_t CAN_MessagePending(CAN_TypeDef* CANx, uint8_t FIFONumber)
function CAN_OperatingModeRequest (line 784) | uint8_t CAN_OperatingModeRequest(CAN_TypeDef* CANx, uint8_t CAN_Operatin...
function CAN_Sleep (line 866) | uint8_t CAN_Sleep(CAN_TypeDef* CANx)
function CAN_WakeUp (line 892) | uint8_t CAN_WakeUp(CAN_TypeDef* CANx)
function CAN_GetLastErrorCode (line 932) | uint8_t CAN_GetLastErrorCode(CAN_TypeDef* CANx)
function CAN_GetReceiveErrorCounter (line 956) | uint8_t CAN_GetReceiveErrorCounter(CAN_TypeDef* CANx)
function CAN_GetLSBTransmitErrorCounter (line 976) | uint8_t CAN_GetLSBTransmitErrorCounter(CAN_TypeDef* CANx)
function CAN_ITConfig (line 1013) | void CAN_ITConfig(CAN_TypeDef* CANx, uint32_t CAN_IT, FunctionalState Ne...
function FlagStatus (line 1053) | FlagStatus CAN_GetFlagStatus(CAN_TypeDef* CANx, uint32_t CAN_FLAG)
function CAN_ClearFlag (line 1153) | void CAN_ClearFlag(CAN_TypeDef* CANx, uint32_t CAN_FLAG)
function ITStatus (line 1213) | ITStatus CAN_GetITStatus(CAN_TypeDef* CANx, uint32_t CAN_IT)
function CAN_ClearITPendingBit (line 1316) | void CAN_ClearITPendingBit(CAN_TypeDef* CANx, uint32_t CAN_IT)
function ITStatus (line 1395) | static ITStatus CheckITStatus(uint32_t CAN_Reg, uint32_t It_Bit)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_cec.c
function CEC_DeInit (line 118) | void CEC_DeInit(void)
function CEC_Init (line 135) | void CEC_Init(CEC_InitTypeDef* CEC_InitStruct)
function CEC_Cmd (line 165) | void CEC_Cmd(FunctionalState NewState)
function CEC_ITConfig (line 187) | void CEC_ITConfig(FunctionalState NewState)
function CEC_OwnAddressConfig (line 200) | void CEC_OwnAddressConfig(uint8_t CEC_OwnAddress)
function CEC_SetPrescaler (line 214) | void CEC_SetPrescaler(uint16_t CEC_Prescaler)
function CEC_SendDataByte (line 228) | void CEC_SendDataByte(uint8_t Data)
function CEC_ReceiveDataByte (line 240) | uint8_t CEC_ReceiveDataByte(void)
function CEC_StartOfMessage (line 251) | void CEC_StartOfMessage(void)
function CEC_EndOfMessageCmd (line 263) | void CEC_EndOfMessageCmd(FunctionalState NewState)
function FlagStatus (line 292) | FlagStatus CEC_GetFlagStatus(uint32_t CEC_FLAG)
function CEC_ClearFlag (line 350) | void CEC_ClearFlag(uint32_t CEC_FLAG)
function ITStatus (line 373) | ITStatus CEC_GetITStatus(uint8_t CEC_IT)
function CEC_ClearITPendingBit (line 409) | void CEC_ClearITPendingBit(uint16_t CEC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_crc.c
function CRC_ResetDR (line 83) | void CRC_ResetDR(void)
function CRC_CalcCRC (line 94) | uint32_t CRC_CalcCRC(uint32_t Data)
function CRC_CalcBlockCRC (line 107) | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength)
function CRC_GetCRC (line 123) | uint32_t CRC_GetCRC(void)
function CRC_SetIDRegister (line 133) | void CRC_SetIDRegister(uint8_t IDValue)
function CRC_GetIDRegister (line 143) | uint8_t CRC_GetIDRegister(void)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_dac.c
function DAC_DeInit (line 98) | void DAC_DeInit(void)
function DAC_Init (line 117) | void DAC_Init(uint32_t DAC_Channel, DAC_InitTypeDef* DAC_InitStruct)
function DAC_StructInit (line 150) | void DAC_StructInit(DAC_InitTypeDef* DAC_InitStruct)
function DAC_Cmd (line 173) | void DAC_Cmd(uint32_t DAC_Channel, FunctionalState NewState)
function DAC_ITConfig (line 203) | void DAC_ITConfig(uint32_t DAC_Channel, uint32_t DAC_IT, FunctionalState...
function DAC_DMACmd (line 233) | void DAC_DMACmd(uint32_t DAC_Channel, FunctionalState NewState)
function DAC_SoftwareTriggerCmd (line 260) | void DAC_SoftwareTriggerCmd(uint32_t DAC_Channel, FunctionalState NewState)
function DAC_DualSoftwareTriggerCmd (line 284) | void DAC_DualSoftwareTriggerCmd(FunctionalState NewState)
function DAC_WaveGenerationCmd (line 314) | void DAC_WaveGenerationCmd(uint32_t DAC_Channel, uint32_t DAC_Wave, Func...
function DAC_SetChannel1Data (line 342) | void DAC_SetChannel1Data(uint32_t DAC_Align, uint16_t Data)
function DAC_SetChannel2Data (line 367) | void DAC_SetChannel2Data(uint32_t DAC_Align, uint16_t Data)
function DAC_SetDualChannelData (line 396) | void DAC_SetDualChannelData(uint32_t DAC_Align, uint16_t Data2, uint16_t...
function DAC_GetDataOutputValue (line 430) | uint16_t DAC_GetDataOutputValue(uint32_t DAC_Channel)
function FlagStatus (line 456) | FlagStatus DAC_GetFlagStatus(uint32_t DAC_Channel, uint32_t DAC_FLAG)
function DAC_ClearFlag (line 489) | void DAC_ClearFlag(uint32_t DAC_Channel, uint32_t DAC_FLAG)
function ITStatus (line 510) | ITStatus DAC_GetITStatus(uint32_t DAC_Channel, uint32_t DAC_IT)
function DAC_ClearITPendingBit (line 548) | void DAC_ClearITPendingBit(uint32_t DAC_Channel, uint32_t DAC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_dbgmcu.c
function DBGMCU_GetREVID (line 84) | uint32_t DBGMCU_GetREVID(void)
function DBGMCU_GetDEVID (line 94) | uint32_t DBGMCU_GetDEVID(void)
function DBGMCU_Config (line 134) | void DBGMCU_Config(uint32_t DBGMCU_Periph, FunctionalState NewState)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_dma.c
function DMA_DeInit (line 108) | void DMA_DeInit(DMA_Channel_TypeDef* DMAy_Channelx)
function DMA_Init (line 202) | void DMA_Init(DMA_Channel_TypeDef* DMAy_Channelx, DMA_InitTypeDef* DMA_I...
function DMA_StructInit (line 259) | void DMA_StructInit(DMA_InitTypeDef* DMA_InitStruct)
function DMA_Cmd (line 294) | void DMA_Cmd(DMA_Channel_TypeDef* DMAy_Channelx, FunctionalState NewState)
function DMA_ITConfig (line 326) | void DMA_ITConfig(DMA_Channel_TypeDef* DMAy_Channelx, uint32_t DMA_IT, F...
function DMA_SetCurrDataCounter (line 353) | void DMA_SetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx, uint16_t...
function DMA_GetCurrDataCounter (line 371) | uint16_t DMA_GetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx)
function FlagStatus (line 433) | FlagStatus DMA_GetFlagStatus(uint32_t DMAy_FLAG)
function DMA_ClearFlag (line 523) | void DMA_ClearFlag(uint32_t DMAy_FLAG)
function ITStatus (line 595) | ITStatus DMA_GetITStatus(uint32_t DMAy_IT)
function DMA_ClearITPendingBit (line 684) | void DMA_ClearITPendingBit(uint32_t DMAy_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_exti.c
function EXTI_DeInit (line 85) | void EXTI_DeInit(void)
function EXTI_Init (line 101) | void EXTI_Init(EXTI_InitTypeDef* EXTI_InitStruct)
function EXTI_StructInit (line 157) | void EXTI_StructInit(EXTI_InitTypeDef* EXTI_InitStruct)
function EXTI_GenerateSWInterrupt (line 171) | void EXTI_GenerateSWInterrupt(uint32_t EXTI_Line)
function FlagStatus (line 186) | FlagStatus EXTI_GetFlagStatus(uint32_t EXTI_Line)
function EXTI_ClearFlag (line 209) | void EXTI_ClearFlag(uint32_t EXTI_Line)
function ITStatus (line 224) | ITStatus EXTI_GetITStatus(uint32_t EXTI_Line)
function EXTI_ClearITPendingBit (line 249) | void EXTI_ClearITPendingBit(uint32_t EXTI_Line)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_flash.c
function FLASH_SetLatency (line 254) | void FLASH_SetLatency(uint32_t FLASH_Latency)
function FLASH_HalfCycleAccessCmd (line 281) | void FLASH_HalfCycleAccessCmd(uint32_t FLASH_HalfCycleAccess)
function FLASH_PrefetchBufferCmd (line 300) | void FLASH_PrefetchBufferCmd(uint32_t FLASH_PrefetchBuffer)
function FLASH_Unlock (line 319) | void FLASH_Unlock(void)
function FLASH_UnlockBank1 (line 340) | void FLASH_UnlockBank1(void)
function FLASH_UnlockBank2 (line 354) | void FLASH_UnlockBank2(void)
function FLASH_Lock (line 372) | void FLASH_Lock(void)
function FLASH_LockBank1 (line 392) | void FLASH_LockBank1(void)
function FLASH_LockBank2 (line 405) | void FLASH_LockBank2(void)
function FLASH_Status (line 419) | FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
function FLASH_Status (line 492) | FLASH_Status FLASH_EraseAllPages(void)
function FLASH_Status (line 555) | FLASH_Status FLASH_EraseAllBank1Pages(void)
function FLASH_Status (line 585) | FLASH_Status FLASH_EraseAllBank2Pages(void)
function FLASH_Status (line 616) | FLASH_Status FLASH_EraseOptionBytes(void)
function FLASH_Status (line 687) | FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
function FLASH_Status (line 880) | FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
function FLASH_Status (line 951) | FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data)
function FLASH_Status (line 997) | FLASH_Status FLASH_EnableWriteProtection(uint32_t FLASH_Pages)
function FLASH_Status (line 1071) | FLASH_Status FLASH_ReadOutProtection(FunctionalState NewState)
function FLASH_Status (line 1140) | FLASH_Status FLASH_UserOptionByteConfig(uint16_t OB_IWDG, uint16_t OB_ST...
function FLASH_Status (line 1194) | FLASH_Status FLASH_BootConfig(uint16_t FLASH_BOOT)
function FLASH_GetUserOptionByte (line 1238) | uint32_t FLASH_GetUserOptionByte(void)
function FLASH_GetWriteProtectionOptionByte (line 1250) | uint32_t FLASH_GetWriteProtectionOptionByte(void)
function FlagStatus (line 1262) | FlagStatus FLASH_GetReadOutProtectionStatus(void)
function FlagStatus (line 1282) | FlagStatus FLASH_GetPrefetchBufferStatus(void)
function FLASH_ITConfig (line 1312) | void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState)
function FlagStatus (line 1379) | FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG)
function FLASH_ClearFlag (line 1465) | void FLASH_ClearFlag(uint32_t FLASH_FLAG)
function FLASH_Status (line 1499) | FLASH_Status FLASH_GetStatus(void)
function FLASH_Status (line 1537) | FLASH_Status FLASH_GetBank1Status(void)
function FLASH_Status (line 1575) | FLASH_Status FLASH_GetBank2Status(void)
function FLASH_Status (line 1617) | FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout)
function FLASH_Status (line 1645) | FLASH_Status FLASH_WaitForLastBank1Operation(uint32_t Timeout)
function FLASH_Status (line 1673) | FLASH_Status FLASH_WaitForLastBank2Operation(uint32_t Timeout)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_fsmc.c
function FSMC_NORSRAMDeInit (line 102) | void FSMC_NORSRAMDeInit(uint32_t FSMC_Bank)
function FSMC_NANDDeInit (line 129) | void FSMC_NANDDeInit(uint32_t FSMC_Bank)
function FSMC_PCCARDDeInit (line 158) | void FSMC_PCCARDDeInit(void)
function FSMC_NORSRAMInit (line 176) | void FSMC_NORSRAMInit(FSMC_NORSRAMInitTypeDef* FSMC_NORSRAMInitStruct)
function FSMC_NANDInit (line 262) | void FSMC_NANDInit(FSMC_NANDInitTypeDef* FSMC_NANDInitStruct)
function FSMC_PCCARDInit (line 328) | void FSMC_PCCARDInit(FSMC_PCCARDInitTypeDef* FSMC_PCCARDInitStruct)
function FSMC_NORSRAMStructInit (line 380) | void FSMC_NORSRAMStructInit(FSMC_NORSRAMInitTypeDef* FSMC_NORSRAMInitStr...
function FSMC_NANDStructInit (line 418) | void FSMC_NANDStructInit(FSMC_NANDInitTypeDef* FSMC_NANDInitStruct)
function FSMC_PCCARDStructInit (line 444) | void FSMC_PCCARDStructInit(FSMC_PCCARDInitTypeDef* FSMC_PCCARDInitStruct)
function FSMC_NORSRAMCmd (line 475) | void FSMC_NORSRAMCmd(uint32_t FSMC_Bank, FunctionalState NewState)
function FSMC_NANDCmd (line 501) | void FSMC_NANDCmd(uint32_t FSMC_Bank, FunctionalState NewState)
function FSMC_PCCARDCmd (line 538) | void FSMC_PCCARDCmd(FunctionalState NewState)
function FSMC_NANDECCCmd (line 564) | void FSMC_NANDECCCmd(uint32_t FSMC_Bank, FunctionalState NewState)
function FSMC_GetECC (line 603) | uint32_t FSMC_GetECC(uint32_t FSMC_Bank)
function FSMC_ITConfig (line 637) | void FSMC_ITConfig(uint32_t FSMC_Bank, uint32_t FSMC_IT, FunctionalState...
function FlagStatus (line 697) | FlagStatus FSMC_GetFlagStatus(uint32_t FSMC_Bank, uint32_t FSMC_FLAG)
function FSMC_ClearFlag (line 747) | void FSMC_ClearFlag(uint32_t FSMC_Bank, uint32_t FSMC_FLAG)
function ITStatus (line 782) | ITStatus FSMC_GetITStatus(uint32_t FSMC_Bank, uint32_t FSMC_IT)
function FSMC_ClearITPendingBit (line 833) | void FSMC_ClearITPendingBit(uint32_t FSMC_Bank, uint32_t FSMC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_gpio.c
function GPIO_DeInit (line 108) | void GPIO_DeInit(GPIO_TypeDef* GPIOx)
function GPIO_AFIODeInit (line 159) | void GPIO_AFIODeInit(void)
function GPIO_Init (line 173) | void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
function GPIO_StructInit (line 266) | void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
function GPIO_ReadInputDataBit (line 281) | uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
function GPIO_ReadInputData (line 305) | uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
function GPIO_ReadOutputDataBit (line 320) | uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
function GPIO_ReadOutputData (line 343) | uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
function GPIO_SetBits (line 358) | void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
function GPIO_ResetBits (line 374) | void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
function GPIO_WriteBit (line 394) | void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction Bit...
function GPIO_Write (line 417) | void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
function GPIO_PinLockConfig (line 432) | void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
function GPIO_EventOutputConfig (line 462) | void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSou...
function GPIO_EventOutputCmd (line 483) | void GPIO_EventOutputCmd(FunctionalState NewState)
function GPIO_PinRemapConfig (line 549) | void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState)
function GPIO_EXTILineConfig (line 609) | void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
function GPIO_ETH_MediaInterfaceConfig (line 630) | void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_i2c.c
function I2C_DeInit (line 162) | void I2C_DeInit(I2C_TypeDef* I2Cx)
function I2C_Init (line 191) | void I2C_Init(I2C_TypeDef* I2Cx, I2C_InitTypeDef* I2C_InitStruct)
function I2C_StructInit (line 311) | void I2C_StructInit(I2C_InitTypeDef* I2C_InitStruct)
function I2C_Cmd (line 335) | void I2C_Cmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_DMACmd (line 359) | void I2C_DMACmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_DMALastTransferCmd (line 383) | void I2C_DMALastTransferCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_GenerateSTART (line 407) | void I2C_GenerateSTART(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_GenerateSTOP (line 431) | void I2C_GenerateSTOP(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_AcknowledgeConfig (line 455) | void I2C_AcknowledgeConfig(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_OwnAddress2Config (line 478) | void I2C_OwnAddress2Config(I2C_TypeDef* I2Cx, uint8_t Address)
function I2C_DualAddressCmd (line 516) | void I2C_DualAddressCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_GeneralCallCmd (line 540) | void I2C_GeneralCallCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_ITConfig (line 569) | void I2C_ITConfig(I2C_TypeDef* I2Cx, uint16_t I2C_IT, FunctionalState Ne...
function I2C_SendData (line 594) | void I2C_SendData(I2C_TypeDef* I2Cx, uint8_t Data)
function I2C_ReceiveData (line 607) | uint8_t I2C_ReceiveData(I2C_TypeDef* I2Cx)
function I2C_Send7bitAddress (line 625) | void I2C_Send7bitAddress(I2C_TypeDef* I2Cx, uint8_t Address, uint8_t I2C...
function I2C_ReadRegister (line 669) | uint16_t I2C_ReadRegister(I2C_TypeDef* I2Cx, uint8_t I2C_Register)
function I2C_SoftwareResetCmd (line 691) | void I2C_SoftwareResetCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_NACKPositionConfig (line 729) | void I2C_NACKPositionConfig(I2C_TypeDef* I2Cx, uint16_t I2C_NACKPosition)
function I2C_SMBusAlertConfig (line 757) | void I2C_SMBusAlertConfig(I2C_TypeDef* I2Cx, uint16_t I2C_SMBusAlert)
function I2C_TransmitPEC (line 781) | void I2C_TransmitPEC(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_PECPositionConfig (line 812) | void I2C_PECPositionConfig(I2C_TypeDef* I2Cx, uint16_t I2C_PECPosition)
function I2C_CalculatePEC (line 836) | void I2C_CalculatePEC(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_GetPEC (line 858) | uint8_t I2C_GetPEC(I2C_TypeDef* I2Cx)
function I2C_ARPCmd (line 883) | void I2C_ARPCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_StretchClockCmd (line 907) | void I2C_StretchClockCmd(I2C_TypeDef* I2Cx, FunctionalState NewState)
function I2C_FastModeDutyCycleConfig (line 933) | void I2C_FastModeDutyCycleConfig(I2C_TypeDef* I2Cx, uint16_t I2C_DutyCycle)
function ErrorStatus (line 1073) | ErrorStatus I2C_CheckEvent(I2C_TypeDef* I2Cx, uint32_t I2C_EVENT)
function I2C_GetLastEvent (line 1121) | uint32_t I2C_GetLastEvent(I2C_TypeDef* I2Cx)
function FlagStatus (line 1176) | FlagStatus I2C_GetFlagStatus(I2C_TypeDef* I2Cx, uint32_t I2C_FLAG)
function I2C_ClearFlag (line 1255) | void I2C_ClearFlag(I2C_TypeDef* I2Cx, uint32_t I2C_FLAG)
function ITStatus (line 1289) | ITStatus I2C_GetITStatus(I2C_TypeDef* I2Cx, uint32_t I2C_IT)
function I2C_ClearITPendingBit (line 1350) | void I2C_ClearITPendingBit(I2C_TypeDef* I2Cx, uint32_t I2C_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_iwdg.c
function IWDG_WriteAccessCmd (line 92) | void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess)
function IWDG_SetPrescaler (line 112) | void IWDG_SetPrescaler(uint8_t IWDG_Prescaler)
function IWDG_SetReload (line 125) | void IWDG_SetReload(uint16_t Reload)
function IWDG_ReloadCounter (line 138) | void IWDG_ReloadCounter(void)
function IWDG_Enable (line 148) | void IWDG_Enable(void)
function FlagStatus (line 161) | FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_pwr.c
function PWR_DeInit (line 112) | void PWR_DeInit(void)
function PWR_BackupAccessCmd (line 124) | void PWR_BackupAccessCmd(FunctionalState NewState)
function PWR_PVDCmd (line 137) | void PWR_PVDCmd(FunctionalState NewState)
function PWR_PVDLevelConfig (line 158) | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)
function PWR_WakeUpPinCmd (line 178) | void PWR_WakeUpPinCmd(FunctionalState NewState)
function PWR_EnterSTOPMode (line 197) | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
function PWR_EnterSTANDBYMode (line 236) | void PWR_EnterSTANDBYMode(void)
function FlagStatus (line 261) | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)
function PWR_ClearFlag (line 287) | void PWR_ClearFlag(uint32_t PWR_FLAG)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_rcc.c
function RCC_DeInit (line 217) | void RCC_DeInit(void)
function RCC_HSEConfig (line 270) | void RCC_HSEConfig(uint32_t RCC_HSE)
function ErrorStatus (line 304) | ErrorStatus RCC_WaitForHSEStartUp(void)
function RCC_AdjustHSICalibrationValue (line 334) | void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue)
function RCC_HSICmd (line 354) | void RCC_HSICmd(FunctionalState NewState)
function RCC_PLLConfig (line 378) | void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t RCC_PLLMul)
function RCC_PLLCmd (line 401) | void RCC_PLLCmd(FunctionalState NewState)
function RCC_PREDIV1Config (line 426) | void RCC_PREDIV1Config(uint32_t RCC_PREDIV1_Source, uint32_t RCC_PREDIV1...
function RCC_PREDIV2Config (line 454) | void RCC_PREDIV2Config(uint32_t RCC_PREDIV2_Div)
function RCC_PLL2Config (line 479) | void RCC_PLL2Config(uint32_t RCC_PLL2Mul)
function RCC_PLL2Cmd (line 505) | void RCC_PLL2Cmd(FunctionalState NewState)
function RCC_PLL3Config (line 523) | void RCC_PLL3Config(uint32_t RCC_PLL3Mul)
function RCC_PLL3Cmd (line 546) | void RCC_PLL3Cmd(FunctionalState NewState)
function RCC_SYSCLKConfig (line 564) | void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource)
function RCC_GetSYSCLKSource (line 587) | uint8_t RCC_GetSYSCLKSource(void)
function RCC_HCLKConfig (line 608) | void RCC_HCLKConfig(uint32_t RCC_SYSCLK)
function RCC_PCLK1Config (line 634) | void RCC_PCLK1Config(uint32_t RCC_HCLK)
function RCC_PCLK2Config (line 660) | void RCC_PCLK2Config(uint32_t RCC_HCLK)
function RCC_ITConfig (line 700) | void RCC_ITConfig(uint8_t RCC_IT, FunctionalState NewState)
function RCC_USBCLKConfig (line 728) | void RCC_USBCLKConfig(uint32_t RCC_USBCLKSource)
function RCC_OTGFSCLKConfig (line 746) | void RCC_OTGFSCLKConfig(uint32_t RCC_OTGFSCLKSource)
function RCC_ADCCLKConfig (line 766) | void RCC_ADCCLKConfig(uint32_t RCC_PCLK2)
function RCC_I2S2CLKConfig (line 792) | void RCC_I2S2CLKConfig(uint32_t RCC_I2S2CLKSource)
function RCC_I2S3CLKConfig (line 811) | void RCC_I2S3CLKConfig(uint32_t RCC_I2S3CLKSource)
function RCC_LSEConfig (line 829) | void RCC_LSEConfig(uint8_t RCC_LSE)
function RCC_LSICmd (line 862) | void RCC_LSICmd(FunctionalState NewState)
function RCC_RTCCLKConfig (line 879) | void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource)
function RCC_RTCCLKCmd (line 893) | void RCC_RTCCLKCmd(FunctionalState NewState)
function RCC_GetClocksFreq (line 908) | void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)
function RCC_AHBPeriphClockCmd (line 1064) | void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewSt...
function RCC_APB2PeriphClockCmd (line 1095) | void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState New...
function RCC_APB1PeriphClockCmd (line 1126) | void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState New...
function RCC_AHBPeriphResetCmd (line 1153) | void RCC_AHBPeriphResetCmd(uint32_t RCC_AHBPeriph, FunctionalState NewSt...
function RCC_APB2PeriphResetCmd (line 1185) | void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState New...
function RCC_APB1PeriphResetCmd (line 1216) | void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState New...
function RCC_BackupResetCmd (line 1237) | void RCC_BackupResetCmd(FunctionalState NewState)
function RCC_ClockSecuritySystemCmd (line 1250) | void RCC_ClockSecuritySystemCmd(FunctionalState NewState)
function RCC_MCOConfig (line 1282) | void RCC_MCOConfig(uint8_t RCC_MCO)
function FlagStatus (line 1326) | FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG)
function RCC_ClearFlag (line 1371) | void RCC_ClearFlag(void)
function ITStatus (line 1402) | ITStatus RCC_GetITStatus(uint8_t RCC_IT)
function RCC_ClearITPendingBit (line 1448) | void RCC_ClearITPendingBit(uint8_t RCC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_rtc.c
function RTC_ITConfig (line 90) | void RTC_ITConfig(uint16_t RTC_IT, FunctionalState NewState)
function RTC_EnterConfigMode (line 111) | void RTC_EnterConfigMode(void)
function RTC_ExitConfigMode (line 122) | void RTC_ExitConfigMode(void)
function RTC_GetCounter (line 133) | uint32_t RTC_GetCounter(void)
function RTC_SetCounter (line 151) | void RTC_SetCounter(uint32_t CounterValue)
function RTC_SetPrescaler (line 166) | void RTC_SetPrescaler(uint32_t PrescalerValue)
function RTC_SetAlarm (line 184) | void RTC_SetAlarm(uint32_t AlarmValue)
function RTC_GetDivider (line 204) | uint32_t RTC_GetDivider(void)
function RTC_WaitForLastTask (line 218) | void RTC_WaitForLastTask(void)
function RTC_WaitForSynchro (line 234) | void RTC_WaitForSynchro(void)
function FlagStatus (line 255) | FlagStatus RTC_GetFlagStatus(uint16_t RTC_FLAG)
function RTC_ClearFlag (line 284) | void RTC_ClearFlag(uint16_t RTC_FLAG)
function ITStatus (line 302) | ITStatus RTC_GetITStatus(uint16_t RTC_IT)
function RTC_ClearITPendingBit (line 329) | void RTC_ClearITPendingBit(uint16_t RTC_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_sdio.c
function SDIO_DeInit (line 161) | void SDIO_DeInit(void)
function SDIO_Init (line 181) | void SDIO_Init(SDIO_InitTypeDef* SDIO_InitStruct)
function SDIO_StructInit (line 219) | void SDIO_StructInit(SDIO_InitTypeDef* SDIO_InitStruct)
function SDIO_ClockCmd (line 235) | void SDIO_ClockCmd(FunctionalState NewState)
function SDIO_SetPowerState (line 251) | void SDIO_SetPowerState(uint32_t SDIO_PowerState)
function SDIO_GetPowerState (line 269) | uint32_t SDIO_GetPowerState(void)
function SDIO_ITConfig (line 307) | void SDIO_ITConfig(uint32_t SDIO_IT, FunctionalState NewState)
function SDIO_DMACmd (line 331) | void SDIO_DMACmd(FunctionalState NewState)
function SDIO_SendCommand (line 346) | void SDIO_SendCommand(SDIO_CmdInitTypeDef *SDIO_CmdInitStruct)
function SDIO_CmdStructInit (line 382) | void SDIO_CmdStructInit(SDIO_CmdInitTypeDef* SDIO_CmdInitStruct)
function SDIO_GetCommandResponse (line 397) | uint8_t SDIO_GetCommandResponse(void)
function SDIO_GetResponse (line 412) | uint32_t SDIO_GetResponse(uint32_t SDIO_RESP)
function SDIO_DataConfig (line 431) | void SDIO_DataConfig(SDIO_DataInitTypeDef* SDIO_DataInitStruct)
function SDIO_DataStructInit (line 472) | void SDIO_DataStructInit(SDIO_DataInitTypeDef* SDIO_DataInitStruct)
function SDIO_GetDataCounter (line 488) | uint32_t SDIO_GetDataCounter(void)
function SDIO_ReadData (line 498) | uint32_t SDIO_ReadData(void)
function SDIO_WriteData (line 508) | void SDIO_WriteData(uint32_t Data)
function SDIO_GetFIFOCount (line 518) | uint32_t SDIO_GetFIFOCount(void)
function SDIO_StartSDIOReadWait (line 529) | void SDIO_StartSDIOReadWait(FunctionalState NewState)
function SDIO_StopSDIOReadWait (line 543) | void SDIO_StopSDIOReadWait(FunctionalState NewState)
function SDIO_SetSDIOReadWaitMode (line 559) | void SDIO_SetSDIOReadWaitMode(uint32_t SDIO_ReadWaitMode)
function SDIO_SetSDIOOperation (line 573) | void SDIO_SetSDIOOperation(FunctionalState NewState)
function SDIO_SendSDIOSuspendCmd (line 587) | void SDIO_SendSDIOSuspendCmd(FunctionalState NewState)
function SDIO_CommandCompletionCmd (line 601) | void SDIO_CommandCompletionCmd(FunctionalState NewState)
function SDIO_CEATAITCmd (line 614) | void SDIO_CEATAITCmd(FunctionalState NewState)
function SDIO_SendCEATACmd (line 627) | void SDIO_SendCEATACmd(FunctionalState NewState)
function FlagStatus (line 666) | FlagStatus SDIO_GetFlagStatus(uint32_t SDIO_FLAG)
function SDIO_ClearFlag (line 704) | void SDIO_ClearFlag(uint32_t SDIO_FLAG)
function ITStatus (line 743) | ITStatus SDIO_GetITStatus(uint32_t SDIO_IT)
function SDIO_ClearITPendingBit (line 779) | void SDIO_ClearITPendingBit(uint32_t SDIO_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_spi.c
function SPI_I2S_DeInit (line 119) | void SPI_I2S_DeInit(SPI_TypeDef* SPIx)
function SPI_Init (line 158) | void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
function I2S_Init (line 219) | void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
function SPI_StructInit (line 379) | void SPI_StructInit(SPI_InitTypeDef* SPI_InitStruct)
function I2S_StructInit (line 407) | void I2S_StructInit(I2S_InitTypeDef* I2S_InitStruct)
function SPI_Cmd (line 436) | void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
function I2S_Cmd (line 460) | void I2S_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
function SPI_I2S_ITConfig (line 491) | void SPI_I2S_ITConfig(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT, FunctionalS...
function SPI_I2S_DMACmd (line 541) | void SPI_I2S_DMACmd(SPI_TypeDef* SPIx, uint16_t SPI_I2S_DMAReq, Function...
function SPI_I2S_SendData (line 567) | void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data)
function SPI_I2S_ReceiveData (line 583) | uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx)
function SPI_NSSInternalSoftwareConfig (line 601) | void SPI_NSSInternalSoftwareConfig(SPI_TypeDef* SPIx, uint16_t SPI_NSSIn...
function SPI_SSOutputCmd (line 625) | void SPI_SSOutputCmd(SPI_TypeDef* SPIx, FunctionalState NewState)
function SPI_DataSizeConfig (line 651) | void SPI_DataSizeConfig(SPI_TypeDef* SPIx, uint16_t SPI_DataSize)
function SPI_TransmitCRC (line 667) | void SPI_TransmitCRC(SPI_TypeDef* SPIx)
function SPI_CalculateCRC (line 683) | void SPI_CalculateCRC(SPI_TypeDef* SPIx, FunctionalState NewState)
function SPI_GetCRC (line 709) | uint16_t SPI_GetCRC(SPI_TypeDef* SPIx, uint8_t SPI_CRC)
function SPI_GetCRCPolynomial (line 734) | uint16_t SPI_GetCRCPolynomial(SPI_TypeDef* SPIx)
function SPI_BiDirectionalLineConfig (line 752) | void SPI_BiDirectionalLineConfig(SPI_TypeDef* SPIx, uint16_t SPI_Direction)
function FlagStatus (line 786) | FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
function SPI_I2S_ClearFlag (line 824) | void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
function ITStatus (line 849) | ITStatus SPI_I2S_GetITStatus(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT)
function SPI_I2S_ClearITPendingBit (line 914) | void SPI_I2S_ClearITPendingBit(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_tim.c
function TIM_DeInit (line 122) | void TIM_DeInit(TIM_TypeDef* TIMx)
function TIM_TimeBaseInit (line 226) | void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_Ti...
function TIM_OC1Init (line 279) | void TIM_OC1Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
function TIM_OC2Init (line 362) | void TIM_OC2Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
function TIM_OC3Init (line 444) | void TIM_OC3Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
function TIM_OC4Init (line 523) | void TIM_OC4Init(TIM_TypeDef* TIMx, TIM_OCInitTypeDef* TIM_OCInitStruct)
function TIM_ICInit (line 587) | void TIM_ICInit(TIM_TypeDef* TIMx, TIM_ICInitTypeDef* TIM_ICInitStruct)
function TIM_PWMIConfig (line 654) | void TIM_PWMIConfig(TIM_TypeDef* TIMx, TIM_ICInitTypeDef* TIM_ICInitStruct)
function TIM_BDTRConfig (line 712) | void TIM_BDTRConfig(TIM_TypeDef* TIMx, TIM_BDTRInitTypeDef *TIM_BDTRInit...
function TIM_TimeBaseStructInit (line 736) | void TIM_TimeBaseStructInit(TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStr...
function TIM_OCStructInit (line 752) | void TIM_OCStructInit(TIM_OCInitTypeDef* TIM_OCInitStruct)
function TIM_ICStructInit (line 771) | void TIM_ICStructInit(TIM_ICInitTypeDef* TIM_ICInitStruct)
function TIM_BDTRStructInit (line 787) | void TIM_BDTRStructInit(TIM_BDTRInitTypeDef* TIM_BDTRInitStruct)
function TIM_Cmd (line 806) | void TIM_Cmd(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_CtrlPWMOutputs (line 831) | void TIM_CtrlPWMOutputs(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_ITConfig (line 872) | void TIM_ITConfig(TIM_TypeDef* TIMx, uint16_t TIM_IT, FunctionalState Ne...
function TIM_GenerateEvent (line 909) | void TIM_GenerateEvent(TIM_TypeDef* TIMx, uint16_t TIM_EventSource)
function TIM_DMAConfig (line 937) | void TIM_DMAConfig(TIM_TypeDef* TIMx, uint16_t TIM_DMABase, uint16_t TIM...
function TIM_DMACmd (line 964) | void TIM_DMACmd(TIM_TypeDef* TIMx, uint16_t TIM_DMASource, FunctionalSta...
function TIM_InternalClockConfig (line 989) | void TIM_InternalClockConfig(TIM_TypeDef* TIMx)
function TIM_ITRxExternalClockConfig (line 1008) | void TIM_ITRxExternalClockConfig(TIM_TypeDef* TIMx, uint16_t TIM_InputTr...
function TIM_TIxExternalClockConfig (line 1035) | void TIM_TIxExternalClockConfig(TIM_TypeDef* TIMx, uint16_t TIM_TIxExter...
function TIM_ETRClockMode1Config (line 1075) | void TIM_ETRClockMode1Config(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPresc...
function TIM_ETRClockMode2Config (line 1117) | void TIM_ETRClockMode2Config(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPresc...
function TIM_ETRConfig (line 1148) | void TIM_ETRConfig(TIM_TypeDef* TIMx, uint16_t TIM_ExtTRGPrescaler, uint...
function TIM_PrescalerConfig (line 1176) | void TIM_PrescalerConfig(TIM_TypeDef* TIMx, uint16_t Prescaler, uint16_t...
function TIM_CounterModeConfig (line 1199) | void TIM_CounterModeConfig(TIM_TypeDef* TIMx, uint16_t TIM_CounterMode)
function TIM_SelectInputTrigger (line 1229) | void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_InputTrigger...
function TIM_EncoderInterfaceConfig (line 1264) | void TIM_EncoderInterfaceConfig(TIM_TypeDef* TIMx, uint16_t TIM_EncoderM...
function TIM_ForcedOC1Config (line 1315) | void TIM_ForcedOC1Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
function TIM_ForcedOC2Config (line 1339) | void TIM_ForcedOC2Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
function TIM_ForcedOC3Config (line 1363) | void TIM_ForcedOC3Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
function TIM_ForcedOC4Config (line 1387) | void TIM_ForcedOC4Config(TIM_TypeDef* TIMx, uint16_t TIM_ForcedAction)
function TIM_ARRPreloadConfig (line 1409) | void TIM_ARRPreloadConfig(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_SelectCOM (line 1433) | void TIM_SelectCOM(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_SelectCCDMA (line 1458) | void TIM_SelectCCDMA(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_CCPreloadControl (line 1483) | void TIM_CCPreloadControl(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_OC1PreloadConfig (line 1509) | void TIM_OC1PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
function TIM_OC2PreloadConfig (line 1534) | void TIM_OC2PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
function TIM_OC3PreloadConfig (line 1558) | void TIM_OC3PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
function TIM_OC4PreloadConfig (line 1582) | void TIM_OC4PreloadConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPreload)
function TIM_OC1FastConfig (line 1606) | void TIM_OC1FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast)
function TIM_OC2FastConfig (line 1632) | void TIM_OC2FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast)
function TIM_OC3FastConfig (line 1657) | void TIM_OC3FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast)
function TIM_OC4FastConfig (line 1682) | void TIM_OC4FastConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCFast)
function TIM_ClearOC1Ref (line 1707) | void TIM_ClearOC1Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear)
function TIM_ClearOC2Ref (line 1733) | void TIM_ClearOC2Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear)
function TIM_ClearOC3Ref (line 1757) | void TIM_ClearOC3Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear)
function TIM_ClearOC4Ref (line 1781) | void TIM_ClearOC4Ref(TIM_TypeDef* TIMx, uint16_t TIM_OCClear)
function TIM_OC1PolarityConfig (line 1805) | void TIM_OC1PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity)
function TIM_OC1NPolarityConfig (line 1828) | void TIM_OC1NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity)
function TIM_OC2PolarityConfig (line 1852) | void TIM_OC2PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity)
function TIM_OC2NPolarityConfig (line 1875) | void TIM_OC2NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity)
function TIM_OC3PolarityConfig (line 1899) | void TIM_OC3PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity)
function TIM_OC3NPolarityConfig (line 1922) | void TIM_OC3NPolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCNPolarity)
function TIM_OC4PolarityConfig (line 1947) | void TIM_OC4PolarityConfig(TIM_TypeDef* TIMx, uint16_t TIM_OCPolarity)
function TIM_CCxCmd (line 1980) | void TIM_CCxCmd(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TIM_CCx)
function TIM_CCxNCmd (line 2010) | void TIM_CCxNCmd(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TIM_C...
function TIM_SelectOCxM (line 2051) | void TIM_SelectOCxM(TIM_TypeDef* TIMx, uint16_t TIM_Channel, uint16_t TI...
function TIM_UpdateDisableConfig (line 2103) | void TIM_UpdateDisableConfig(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_UpdateRequestConfig (line 2131) | void TIM_UpdateRequestConfig(TIM_TypeDef* TIMx, uint16_t TIM_UpdateSource)
function TIM_SelectHallSensor (line 2155) | void TIM_SelectHallSensor(TIM_TypeDef* TIMx, FunctionalState NewState)
function TIM_SelectOnePulseMode (line 2181) | void TIM_SelectOnePulseMode(TIM_TypeDef* TIMx, uint16_t TIM_OPMode)
function TIM_SelectOutputTrigger (line 2213) | void TIM_SelectOutputTrigger(TIM_TypeDef* TIMx, uint16_t TIM_TRGOSource)
function TIM_SelectSlaveMode (line 2236) | void TIM_SelectSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_SlaveMode)
function TIM_SelectMasterSlaveMode (line 2257) | void TIM_SelectMasterSlaveMode(TIM_TypeDef* TIMx, uint16_t TIM_MasterSla...
function TIM_SetCounter (line 2275) | void TIM_SetCounter(TIM_TypeDef* TIMx, uint16_t Counter)
function TIM_SetAutoreload (line 2289) | void TIM_SetAutoreload(TIM_TypeDef* TIMx, uint16_t Autoreload)
function TIM_SetCompare1 (line 2303) | void TIM_SetCompare1(TIM_TypeDef* TIMx, uint16_t Compare1)
function TIM_SetCompare2 (line 2317) | void TIM_SetCompare2(TIM_TypeDef* TIMx, uint16_t Compare2)
function TIM_SetCompare3 (line 2331) | void TIM_SetCompare3(TIM_TypeDef* TIMx, uint16_t Compare3)
function TIM_SetCompare4 (line 2345) | void TIM_SetCompare4(TIM_TypeDef* TIMx, uint16_t Compare4)
function TIM_SetIC1Prescaler (line 2364) | void TIM_SetIC1Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC)
function TIM_SetIC2Prescaler (line 2386) | void TIM_SetIC2Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC)
function TIM_SetIC3Prescaler (line 2408) | void TIM_SetIC3Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC)
function TIM_SetIC4Prescaler (line 2430) | void TIM_SetIC4Prescaler(TIM_TypeDef* TIMx, uint16_t TIM_ICPSC)
function TIM_SetClockDivision (line 2452) | void TIM_SetClockDivision(TIM_TypeDef* TIMx, uint16_t TIM_CKD)
function TIM_GetCapture1 (line 2468) | uint16_t TIM_GetCapture1(TIM_TypeDef* TIMx)
function TIM_GetCapture2 (line 2481) | uint16_t TIM_GetCapture2(TIM_TypeDef* TIMx)
function TIM_GetCapture3 (line 2494) | uint16_t TIM_GetCapture3(TIM_TypeDef* TIMx)
function TIM_GetCapture4 (line 2507) | uint16_t TIM_GetCapture4(TIM_TypeDef* TIMx)
function TIM_GetCounter (line 2520) | uint16_t TIM_GetCounter(TIM_TypeDef* TIMx)
function TIM_GetPrescaler (line 2533) | uint16_t TIM_GetPrescaler(TIM_TypeDef* TIMx)
function FlagStatus (line 2567) | FlagStatus TIM_GetFlagStatus(TIM_TypeDef* TIMx, uint16_t TIM_FLAG)
function TIM_ClearFlag (line 2611) | void TIM_ClearFlag(TIM_TypeDef* TIMx, uint16_t TIM_FLAG)
function ITStatus (line 2643) | ITStatus TIM_GetITStatus(TIM_TypeDef* TIMx, uint16_t TIM_IT)
function TIM_ClearITPendingBit (line 2687) | void TIM_ClearITPendingBit(TIM_TypeDef* TIMx, uint16_t TIM_IT)
function TI1_Config (line 2712) | static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint1...
function TI2_Config (line 2759) | static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint1...
function TI3_Config (line 2808) | static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint1...
function TI4_Config (line 2856) | static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint1...
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_usart.c
function USART_DeInit (line 130) | void USART_DeInit(USART_TypeDef* USARTx)
function USART_Init (line 176) | void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct)
function USART_StructInit (line 281) | void USART_StructInit(USART_InitTypeDef* USART_InitStruct)
function USART_ClockInit (line 302) | void USART_ClockInit(USART_TypeDef* USARTx, USART_ClockInitTypeDef* USAR...
function USART_ClockStructInit (line 333) | void USART_ClockStructInit(USART_ClockInitTypeDef* USART_ClockInitStruct)
function USART_Cmd (line 351) | void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState)
function USART_ITConfig (line 388) | void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, Functional...
function USART_DMACmd (line 448) | void USART_DMACmd(USART_TypeDef* USARTx, uint16_t USART_DMAReq, Function...
function USART_SetAddress (line 476) | void USART_SetAddress(USART_TypeDef* USARTx, uint8_t USART_Address)
function USART_WakeUpConfig (line 511) | void USART_WakeUpConfig(USART_TypeDef* USARTx, uint16_t USART_WakeUp)
function USART_ReceiverWakeUpCmd (line 530) | void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewS...
function USART_LINBreakDetectLengthConfig (line 559) | void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, uint16_t US...
function USART_LINCmd (line 578) | void USART_LINCmd(USART_TypeDef* USARTx, FunctionalState NewState)
function USART_SendData (line 604) | void USART_SendData(USART_TypeDef* USARTx, uint16_t Data)
function USART_ReceiveData (line 621) | uint16_t USART_ReceiveData(USART_TypeDef* USARTx)
function USART_SendBreak (line 637) | void USART_SendBreak(USART_TypeDef* USARTx)
function USART_SetGuardTime (line 653) | void USART_SetGuardTime(USART_TypeDef* USARTx, uint8_t USART_GuardTime)
function USART_SetPrescaler (line 673) | void USART_SetPrescaler(USART_TypeDef* USARTx, uint8_t USART_Prescaler)
function USART_SmartCardCmd (line 704) | void USART_SmartCardCmd(USART_TypeDef* USARTx, FunctionalState NewState)
function USART_SmartCardNACKCmd (line 729) | void USART_SmartCardNACKCmd(USART_TypeDef* USARTx, FunctionalState NewSt...
function USART_HalfDuplexCmd (line 755) | void USART_HalfDuplexCmd(USART_TypeDef* USARTx, FunctionalState NewState)
function USART_OverSampling8Cmd (line 786) | void USART_OverSampling8Cmd(USART_TypeDef* USARTx, FunctionalState NewSt...
function USART_OneBitMethodCmd (line 813) | void USART_OneBitMethodCmd(USART_TypeDef* USARTx, FunctionalState NewState)
function USART_IrDAConfig (line 842) | void USART_IrDAConfig(USART_TypeDef* USARTx, uint16_t USART_IrDAMode)
function USART_IrDACmd (line 861) | void USART_IrDACmd(USART_TypeDef* USARTx, FunctionalState NewState)
function FlagStatus (line 898) | FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, uint16_t USART_FLAG)
function USART_ClearFlag (line 947) | void USART_ClearFlag(USART_TypeDef* USARTx, uint16_t USART_FLAG)
function ITStatus (line 980) | ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT)
function USART_ClearITPendingBit (line 1054) | void USART_ClearITPendingBit(USART_TypeDef* USARTx, uint16_t USART_IT)
FILE: firmware/system/src/stm32f1-stdperiph/stm32f10x_wwdg.c
function WWDG_DeInit (line 102) | void WWDG_DeInit(void)
function WWDG_SetPrescaler (line 118) | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler)
function WWDG_SetWindowValue (line 137) | void WWDG_SetWindowValue(uint8_t WindowValue)
function WWDG_EnableIT (line 159) | void WWDG_EnableIT(void)
function WWDG_SetCounter (line 170) | void WWDG_SetCounter(uint8_t Counter)
function WWDG_Enable (line 185) | void WWDG_Enable(uint8_t Counter)
function FlagStatus (line 197) | FlagStatus WWDG_GetFlagStatus(void)
function WWDG_ClearFlag (line 207) | void WWDG_ClearFlag(void)
FILE: gui/ServoGui.py
class SerialThread (line 39) | class SerialThread(threading.Thread):
method __init__ (line 40) | def __init__(self, queue, writequeue, ser):
method stop (line 47) | def stop(self):
method run (line 50) | def run(self):
class topFrame (line 69) | class topFrame(Frame):
method __init__ (line 70) | def __init__(self, parent):
method setUI (line 75) | def setUI(self):
method baudValidate (line 176) | def baudValidate(self):
method openPort (line 187) | def openPort(self):
method closePort (line 202) | def closePort(self):
method process_serial (line 211) | def process_serial(self):
method startStream (line 220) | def startStream(self):
method stopStream (line 223) | def stopStream(self):
method getConfig (line 226) | def getConfig(self):
method saveConfig (line 229) | def saveConfig(self):
method sendConfig (line 232) | def sendConfig(self):
method getComPorts (line 239) | def getComPorts(self):
method handleLine (line 246) | def handleLine(self, line):
method handleStr (line 259) | def handleStr(self, strm):
method updateCanvas (line 292) | def updateCanvas(self):
function main (line 319) | def main():
Condensed preview — 138 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,357K chars).
[
{
"path": ".gitignore",
"chars": 402,
"preview": "# Object files\n*.o\n*.ko\n*.obj\n*.elf\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Libraries\n*.a\n*.la\n*.lo\n\n# Shared objects (inc"
},
{
"path": "LICENSE",
"chars": 18047,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "README.md",
"chars": 2727,
"preview": "# bldc-drive\n\nThis is a project developing a simple BLDC servo controller. It is based on an STM32F103 microcontroller.\n"
},
{
"path": "firmware/.cproject",
"chars": 46685,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<?fileVersion 4.0.0?><cproject storage_type_id=\"org.eclipse.cdt.c"
},
{
"path": "firmware/.project",
"chars": 811,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>bldc_drive</name>\n\t<comment></comment>\n\t<projects>\n\t<"
},
{
"path": "firmware/include/stm32f10x_conf.h",
"chars": 3286,
"preview": "/**\r\n ******************************************************************************\r\n * @file Project/STM32F10x_St"
},
{
"path": "firmware/ldscripts/libs.ld",
"chars": 88,
"preview": "\n/*\n * Placeholder to list other libraries required by the application.\n \nGROUP(\n)\n\n */\n"
},
{
"path": "firmware/ldscripts/mem.ld",
"chars": 930,
"preview": "/*\n * Memory Spaces Definitions.\n *\n * Need modifying for a specific board. \n * FLASH.ORIGIN: starting address of flas"
},
{
"path": "firmware/ldscripts/sections.ld",
"chars": 10334,
"preview": "/*\n * Default linker script for STM32Fxxx.\n */\n\n/*\n * The '__stack' definition is required by crt0, do not remove it.\n *"
},
{
"path": "firmware/src/adc.c",
"chars": 4292,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/adc.h",
"chars": 993,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/configuration.c",
"chars": 5397,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/configuration.h",
"chars": 2919,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/eeprom.c",
"chars": 20251,
"preview": "/**\n ******************************************************************************\n * @file EEPROM_Emulation/src/e"
},
{
"path": "firmware/src/eeprom.h",
"chars": 3483,
"preview": "/**\n ******************************************************************************\n * @file EEPROM_Emulation/inc/e"
},
{
"path": "firmware/src/encoder.c",
"chars": 7400,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/encoder.h",
"chars": 1697,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/hall.c",
"chars": 3932,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/hall.h",
"chars": 1001,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/input.c",
"chars": 7912,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/input.h",
"chars": 1446,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/main.c",
"chars": 3344,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/pid.c",
"chars": 4210,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/pid.h",
"chars": 1507,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/pwm.c",
"chars": 11281,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/pwm.h",
"chars": 1367,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/usart.c",
"chars": 7126,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/usart.h",
"chars": 1185,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/src/utils.c",
"chars": 1840,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\n "
},
{
"path": "firmware/src/utils.h",
"chars": 1134,
"preview": "/*\n \tbldc-drive Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller.\n\tC"
},
{
"path": "firmware/system/include/arm/semihosting.h",
"chars": 3028,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n#ifndef ARM_SEMIHOSTING_"
},
{
"path": "firmware/system/include/cmsis/README_CMSIS.txt",
"chars": 572,
"preview": "* -------------------------------------------------------------------\n* Copyright (C) 2011-2014 ARM Limited. All rights "
},
{
"path": "firmware/system/include/cmsis/README_DEVICE.txt",
"chars": 213,
"preview": "The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip, \nthe folder:\n\n\tSTM32F10x_StdPeriph_Lib_V3.5.0/L"
},
{
"path": "firmware/system/include/cmsis/arm_common_tables.h",
"chars": 4900,
"preview": "/* ----------------------------------------------------------------------\r\n* Copyright (C) 2010-2013 ARM Limited. All ri"
},
{
"path": "firmware/system/include/cmsis/arm_const_structs.h",
"chars": 2805,
"preview": "/* ----------------------------------------------------------------------\r\n* Copyright (C) 2010-2013 ARM Limited. All ri"
},
{
"path": "firmware/system/include/cmsis/arm_math.h",
"chars": 244776,
"preview": "/* ----------------------------------------------------------------------\r\n* Copyright (C) 2010-2014 ARM Limited. All ri"
},
{
"path": "firmware/system/include/cmsis/cmsis_device.h",
"chars": 219,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n#ifndef STM32F1_CMSIS_DE"
},
{
"path": "firmware/system/include/cmsis/core_cm0.h",
"chars": 34287,
"preview": "/**************************************************************************//**\r\n * @file core_cm0.h\r\n * @brief C"
},
{
"path": "firmware/system/include/cmsis/core_cm0plus.h",
"chars": 41674,
"preview": "/**************************************************************************//**\r\n * @file core_cm0plus.h\r\n * @brief "
},
{
"path": "firmware/system/include/cmsis/core_cm3.h",
"chars": 100704,
"preview": "/**************************************************************************//**\r\n * @file core_cm3.h\r\n * @brief C"
},
{
"path": "firmware/system/include/cmsis/core_cm4.h",
"chars": 110179,
"preview": "/**************************************************************************//**\r\n * @file core_cm4.h\r\n * @brief C"
},
{
"path": "firmware/system/include/cmsis/core_cm4_simd.h",
"chars": 22959,
"preview": "/**************************************************************************//**\r\n * @file core_cm4_simd.h\r\n * @brief"
},
{
"path": "firmware/system/include/cmsis/core_cmFunc.h",
"chars": 17285,
"preview": "/**************************************************************************//**\r\n * @file core_cmFunc.h\r\n * @brief "
},
{
"path": "firmware/system/include/cmsis/core_cmInstr.h",
"chars": 20817,
"preview": "/**************************************************************************//**\r\n * @file core_cmInstr.h\r\n * @brief "
},
{
"path": "firmware/system/include/cmsis/core_sc000.h",
"chars": 42689,
"preview": "/**************************************************************************//**\r\n * @file core_sc000.h\r\n * @brief "
},
{
"path": "firmware/system/include/cmsis/core_sc300.h",
"chars": 99153,
"preview": "/**************************************************************************//**\r\n * @file core_sc300.h\r\n * @brief "
},
{
"path": "firmware/system/include/cmsis/stm32f10x.h",
"chars": 634135,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x.h\r\n * @au"
},
{
"path": "firmware/system/include/cmsis/system_stm32f10x.h",
"chars": 2085,
"preview": "/**\r\n ******************************************************************************\r\n * @file system_stm32f10x.h\r\n"
},
{
"path": "firmware/system/include/cortexm/ExceptionHandlers.h",
"chars": 987,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n#ifndef CORTEXM_EXCEPTIO"
},
{
"path": "firmware/system/include/diag/Trace.h",
"chars": 2832,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n#ifndef DIAG_TRACE_H_\n#d"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/README_STDPERIPH.txt",
"chars": 127,
"preview": "These files are from stsw-stm32054.zip, the folder:\n\n\tSTM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Drive"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/misc.h",
"chars": 8982,
"preview": "/**\r\n ******************************************************************************\r\n * @file misc.h\r\n * @author "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_adc.h",
"chars": 21882,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_adc.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_bkp.h",
"chars": 7555,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_bkp.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_can.h",
"chars": 27751,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_can.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_cec.h",
"chars": 6573,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_cec.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_crc.h",
"chars": 2162,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_crc.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_dac.h",
"chars": 15233,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dac.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_dbgmcu.h",
"chars": 3818,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dbgmcu.h\r\n"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_dma.h",
"chars": 20754,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dma.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_exti.h",
"chars": 7016,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_exti.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_flash.h",
"chars": 25445,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_flash.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_fsmc.h",
"chars": 27016,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_fsmc.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_gpio.h",
"chars": 20175,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_gpio.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_i2c.h",
"chars": 30221,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_i2c.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_iwdg.h",
"chars": 3828,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_iwdg.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_pwr.h",
"chars": 4383,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_pwr.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_rcc.h",
"chars": 30452,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_rcc.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_rtc.h",
"chars": 3857,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_rtc.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_sdio.h",
"chars": 22056,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_sdio.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_spi.h",
"chars": 17917,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_spi.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_tim.h",
"chars": 52619,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_tim.h\r\n *"
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_usart.h",
"chars": 16740,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_usart.h\r\n "
},
{
"path": "firmware/system/include/stm32f1-stdperiph/stm32f10x_wwdg.h",
"chars": 2966,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_wwdg.h\r\n "
},
{
"path": "firmware/system/src/cmsis/README_DEVICE.txt",
"chars": 227,
"preview": "The system_stm32f10x.c file is from stsw-stm32054.zip, the folder:\n\n\tSTM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/"
},
{
"path": "firmware/system/src/cmsis/system_stm32f10x.c",
"chars": 36557,
"preview": "/**\r\n ******************************************************************************\r\n * @file system_stm32f10x.c\r\n"
},
{
"path": "firmware/system/src/cmsis/vectors_stm32f10x.c",
"chars": 21711,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/cortexm/_initialize_hardware.c",
"chars": 1357,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/cortexm/_reset_hardware.c",
"chars": 875,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/cortexm/exception_handlers.c",
"chars": 2167,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/diag/Trace.c",
"chars": 1464,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/diag/trace_impl.c",
"chars": 8253,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/newlib/README.txt",
"chars": 441,
"preview": "\nThe following files extend or replace some of the the newlib functionality:\n\n_startup.c: a customised startup sequence,"
},
{
"path": "firmware/system/src/newlib/_cxx.cpp",
"chars": 1026,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/newlib/_exit.c",
"chars": 1237,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/newlib/_sbrk.c",
"chars": 1602,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/newlib/_startup.c",
"chars": 7569,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// ---------------------"
},
{
"path": "firmware/system/src/newlib/_syscalls.c",
"chars": 24479,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Parts of this file are from the newlib sources, issued under G"
},
{
"path": "firmware/system/src/newlib/_write.c",
"chars": 1374,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n// Do not include on sem"
},
{
"path": "firmware/system/src/newlib/assert.c",
"chars": 1534,
"preview": "//\n// This file is part of the µOS++ III distribution.\n// Copyright (c) 2014 Liviu Ionescu.\n//\n\n#include <assert.h>\n#inc"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/README_STDPERIPH.txt",
"chars": 127,
"preview": "These files are from stsw-stm32054.zip, the folder:\n\n\tSTM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Drive"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/misc.c",
"chars": 7278,
"preview": "/**\r\n ******************************************************************************\r\n * @file misc.c\r\n * @author "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_adc.c",
"chars": 47402,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_adc.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_bkp.c",
"chars": 8681,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_bkp.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_can.c",
"chars": 45297,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_can.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_cec.c",
"chars": 11689,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_cec.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_crc.c",
"chars": 3347,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_crc.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_dac.c",
"chars": 19087,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dac.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_dbgmcu.c",
"chars": 5149,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dbgmcu.c\r\n"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_dma.c",
"chars": 29607,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_dma.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_exti.c",
"chars": 6959,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_exti.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_flash.c",
"chars": 62994,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_flash.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_fsmc.c",
"chars": 35484,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_fsmc.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_gpio.c",
"chars": 23221,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_gpio.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_i2c.c",
"chars": 46678,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_i2c.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_iwdg.c",
"chars": 4916,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_iwdg.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_pwr.c",
"chars": 8759,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_pwr.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_rcc.c",
"chars": 51271,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_rcc.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_rtc.c",
"chars": 8794,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_rtc.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_sdio.c",
"chars": 28933,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_sdio.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_spi.c",
"chars": 31138,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_spi.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_tim.c",
"chars": 109355,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_tim.c\r\n *"
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_usart.c",
"chars": 38954,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_usart.c\r\n "
},
{
"path": "firmware/system/src/stm32f1-stdperiph/stm32f10x_wwdg.c",
"chars": 5735,
"preview": "/**\r\n ******************************************************************************\r\n * @file stm32f10x_wwdg.c\r\n "
},
{
"path": "gui/ServoGui.py",
"chars": 10906,
"preview": "#!/usr/bin/python\n\nfrom Tkinter import Tk, Label, BOTH, Y, LEFT, RIGHT, X, RAISED, SUNKEN, StringVar, END, DISABLED, NOR"
},
{
"path": "gui/__init__.py",
"chars": 24,
"preview": "# -*- coding: utf-8 -*-\n"
},
{
"path": "gui/servogui.nja",
"chars": 543,
"preview": "{\n \"mainFile\": \"ServoGui.py\", \n \"use-tabs\": false, \n \"venv\": \"\", \n \"relatedProjects\": [], \n \"name\": \"ServoGui\", \n "
},
{
"path": "hardware/bldc_control_v2/bldc_control_ver2.kicad_pcb",
"chars": 302722,
"preview": "(kicad_pcb (version 20160815) (host pcbnew \"(2017-01-20 revision 2de913797)-master\")\n\n (general\n (links 164)\n (no"
},
{
"path": "hardware/bldc_control_v2/bldc_control_ver2.net",
"chars": 36230,
"preview": "(export (version D)\n (design\n (source /home/philipp/Dokumente/dev/bldc-drive/hardware/bldc_control_v2/bldc_control_v"
},
{
"path": "hardware/bldc_control_v2/bldc_control_ver2.pro",
"chars": 1336,
"preview": "update=Mo 20 Feb 2017 11:46:24 CET\nversion=1\nlast_client=eeschema\n[pcbnew]\nversion=1\nLastNetListRead=\nUseCmpFile=1\nPadDr"
},
{
"path": "hardware/bldc_control_v2/bldc_control_ver2.sch",
"chars": 48082,
"preview": "EESchema Schematic File Version 2\nLIBS:bldc_control_ver2-rescue\nLIBS:power\nLIBS:device\nLIBS:transistors\nLIBS:conn\nLIBS:l"
},
{
"path": "hardware/bldc_control_v3/bldc_control_ver3.kicad_pcb",
"chars": 303723,
"preview": "(kicad_pcb (version 20160815) (host pcbnew \"(2016-10-11 revision bf73925)-master\")\n\n (general\n (links 178)\n (no_c"
},
{
"path": "hardware/bldc_control_v3/bldc_control_ver3.net",
"chars": 37633,
"preview": "(export (version D)\n (design\n (source /home/pekka/git/bldc-drive/hardware/bldc_control_v3/bldc_control_ver3.sch)\n "
},
{
"path": "hardware/bldc_control_v3/bldc_control_ver3.pro",
"chars": 1354,
"preview": "update=Sat 30 Apr 2016 12:53:15 PM EEST\nversion=1\nlast_client=kicad\n[pcbnew]\nversion=1\nLastNetListRead=\nUseCmpFile=1\nPad"
},
{
"path": "hardware/bldc_control_v3/bldc_control_ver3.sch",
"chars": 44697,
"preview": "EESchema Schematic File Version 2\nLIBS:power\nLIBS:device\nLIBS:transistors\nLIBS:conn\nLIBS:linear\nLIBS:regul\nLIBS:74xx\nLIB"
},
{
"path": "hardware/bldc_drive_v2/Alu_casing.kicad_pcb",
"chars": 250874,
"preview": "(kicad_pcb (version 4) (host pcbnew \"(2015-08-01 BZR 6032)-product\")\n\n (general\n (links 105)\n (no_connects 0)\n "
},
{
"path": "hardware/bldc_drive_v2/Alu_casing.pro",
"chars": 1205,
"preview": "update=22/05/2015 07:44:53\nversion=1\nlast_client=kicad\n[general]\nversion=1\nRootSch=\nBoardNm=\n[pcbnew]\nversion=1\nLastNetL"
},
{
"path": "hardware/bldc_drive_v2/bldc_drive.kicad_pcb",
"chars": 246081,
"preview": "(kicad_pcb (version 4) (host pcbnew \"(2015-08-01 BZR 6032)-product\")\n\n (general\n (links 105)\n (no_connects 0)\n "
},
{
"path": "hardware/bldc_drive_v2/bldc_drive.net",
"chars": 22860,
"preview": "(export (version D)\n (design\n (source /home/pekka/git/bldc-drive/hardware/bldc_drive_v2/bldc_drive.sch)\n (date \"S"
},
{
"path": "hardware/bldc_drive_v2/bldc_drive.pro",
"chars": 1249,
"preview": "update=Tue 06 Oct 2015 08:16:18 PM EEST\nversion=1\nlast_client=kicad\n[pcbnew]\nversion=1\nLastNetListRead=\nUseCmpFile=1\nPad"
},
{
"path": "hardware/bldc_drive_v2/bldc_drive.sch",
"chars": 28723,
"preview": "EESchema Schematic File Version 2\nLIBS:power\nLIBS:device\nLIBS:transistors\nLIBS:conn\nLIBS:linear\nLIBS:74xx\nLIBS:cmos4000\n"
},
{
"path": "hardware/libraries/6n137.bck",
"chars": 48,
"preview": "EESchema-DOCLIB Version 2.0\n#\n#End Doc Library\n"
},
{
"path": "hardware/libraries/6n137.dcm",
"chars": 48,
"preview": "EESchema-DOCLIB Version 2.0\n#\n#End Doc Library\n"
},
{
"path": "hardware/libraries/6n137.lib",
"chars": 2734,
"preview": "EESchema-LIBRARY Version 2.3\n#encoding utf-8\n#\n# 6N136\n#\nDEF 6N136 U 0 10 Y Y 1 F N\nF0 \"U\" -50 350 70 H V C CNN\nF1 \"6N13"
},
{
"path": "hardware/libraries/INA270.lib",
"chars": 2601,
"preview": "EESchema-LIBRARY Version 2.3\n#encoding utf-8\n#\n# INA27x\n#\nDEF INA27x U 0 40 Y Y 1 F N\nF0 \"U\" 50 -50 60 H V C CNN\nF1 \"INA"
},
{
"path": "hardware/libraries/custom_7805.dcm",
"chars": 85011,
"preview": "EESchema-DOCLIB Version 2.0\n#\n$CMP 7805\nD Linear Regulator +5V\nK POWER REGUL\nF regulator\\lm78xx.pdf\n$ENDCMP\n#\n$CMP 7805"
},
{
"path": "hardware/libraries/custom_7805.lib",
"chars": 58448,
"preview": "EESchema-LIBRARY Version 2.3\n#encoding utf-8\n#\n# 7805\n#\nDEF 7805 U 0 30 N Y 1 F N\nF0 \"U\" 150 -196 60 H V C CNN\nF1 \"7805\""
},
{
"path": "hardware/libraries/vias.pretty/Via-0.6mm.kicad_mod",
"chars": 371,
"preview": "(module Via-0.6mm (layer F.Cu) (tedit 57D1BC1C)\n (fp_text reference REF** (at 0 1.778) (layer F.SilkS) hide\n (effect"
}
]
About this extraction
This page contains the full source code of the pekkaroi/bldc-drive GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 138 files (4.0 MB), approximately 1.1M tokens, and a symbol index with 1161 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.