miniFOC 1.0.3
This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.
File List
Here is a list of all documented files with brief descriptions:
[detail level 12345]
  algorithm
 encoder.cThis file contains the code implementation of angle acquisition and initialization functions of sc60228 and sc60224
 encoder.hThis is the header file of encoder.c
 fast_math.cThis file contains the code implementation of sine function value lookup table and fast calculation of sine value
 fast_math.hThis is the header file of fast_math.c, the macros of fast amplitude limiting algorithm and cosine function evaluation algorithm are defined
 filter.cThis file contains the code implementation of first-order digital RC low-pass filter algorithm and the code implementation of low-pass filter coefficient calculation
 filter.hThis is the header file of filter.c, which defines the structure of filter algorithm
 foc.cThis document is mainly the code implementation of motor phase sequence correction and FOC algorithm
 foc.hThis is the header file of foc.c, which defines the structure of FOC algorithm and angle conversion factor
 pid.cPID algorithm implementation source code
 pid.hThis is the header file of pid.c, which defines the structure of PID algorithm and closed-loop state macro
 report.cThis file is used to write the report correlation function of the feedback host computer
 report.hThis is the header file of report.c
  build
  CMakeFiles
  3.22.3
  CompilerIdC
 CMakeCCompilerId.c
  hardware
 flash.cThis file contains the code implementation of on-chip flash reading, writing and erasing, as well as storing and reading user configurations
 flash.hThis is the header file of flash.c
 led.hThis file contains macros for LED initialization and related IO port operations
 spi.cThis file contains the initialization of SPI peripherals and the code implementation of reading and writing half words
 spi.hThis is the header file of spi.c
 timer.cThis file contains the code implementation of timer initialization and disable timer function and setting timer comparison value
 timer.hThis is the header file of timer.c
 uart.cThis file contains the code implementation of UART interface initialization function and medium capacity transmission protocol transceiver function
 uart.hThis is the header file of uart.c
  system
 gd32f1x0_it.cGd32f1x0 interrupt handler function source file
 gd32f1x0_it.hGd32f1x0 interrupt handler function header file
 main.hMain function Header File
 system.cSystem basic function source file
 system.hSystem basic function header file
 config.hUsed to place important parameter configurations for users
 error.hUsed to check whether the user configured parameters conflict
 main.cMiniFOC main source file, The relevant operations and main function after unpacking of medium capacity transmission protocol are implemented in this document