Hardware manual

49
In this subsection I will present only constants for run time phase table generation which
are defined in pxmc_internal.h. All functions which predefinitions can be found here will
be or already were described in above or below subsections.
PXMC_PTPROF_DEFAULT states that we are going to use a
standard or default phase table. The phase table has in this
case triangular shape.
PXMC_PTPROF_SIN decides that our phase table will have
sinusoidal shape.
PXMC_PTPROF_TRIANG. This flag informs that the shape of
phase table should be triangular. This shape is used also when
we use PXMC_PTPROF_DEFAULT flag.
PXMC_PTPROF_TRAPEZ states that the shape of the phase
table is trapezoidal.
PXMC_PTPROF_3PH. This flag informs that we are going to
use three phase tables with sinusoidal shape. In current state
this flag is the same as PXMC_PTPROF_SIN3PH.
PXMC_PTPROF_SIN3PH a/a.
Fig. 5.3.12-1. Flags for
phase tables.
PXMC_PTPROF_SIN3FUP. By setting this flag we decide to use three phase tables with
sinusoidal shape. The only one difference between this and above, is that here we use
differences between the current minimal value from one of three phases and the other
phases. Thanks that, when we send some output to the PWM, one of the transistor is
always switch off. This allows reducing the losses of a current caused by transistor
switching.
5.3.13. PXMC_PTABLE.C
This file is highly correlated with described above pxmc_internal.h. Mostly it implements
all functions necessary to get proper phase tables which we can later use for a motor
rotation. Unfortunately, some microcontrollers don't have FPU. Due to this it is not very
good idea to use these functions directly, otherwise it can take some time to generate all
data. Great solution to this problem is to use below functions in some external program,
where we just generate the tables off-line. When we will have them, then we can add