Escolar Documentos
Profissional Documentos
Cultura Documentos
11
13
16
18
19
22
34
38
36
39
40
54
Figure 1
dT = RI dl X B
(2.1)
Figure 2
3
Now that weve discussed the basic DC motor, lets consider a variation as shown in figure 2. In
this case, weve replaced the DC power source with an AC power source and eliminated the
commutators all together. Brushes are still used to connect the stationary power source to the
rotating shaft. Remembering the Lorentz force from equation 2.1, the force produced remains a
function of the cross product of magnetic fields. In this case, however, the changing current
produced by the AC power source does the job of the commutators in the DC motor.
This brings us to an important difference between DC and AC motors. The Lorentz force
generated in each motor depends upon the two magnetic fields. By increasing the current in the
wire of figure 1, we can increase its magnetic field to produce more force. More force means
faster rotation. Thus, the speed of a DC motor is a function of the DC voltage applied. Although
it is true that the voltage supplied by the AC power source of figure 2 will affect the force
produced and how quickly the shaft rotates, the frequency of the AC source also plays a role. In
general, the speed of an AC motor is a function of the frequency of the AC power source unless
the applied power or load on the motor is not sufficient to drive the motor at the given AC
frequency. In this case, the AC frequency will become a multiple of the rotating frequency. Thus,
it is possible to input 100 Hz to obtain 25, 50, 75, or 100 RPS.
You may have noticed that all motors we have discussed so far use brushes to produce rotation.
Brushless motors result from a simple variation of the AC motor shown in figure 2. In this case,
the permanent magnet is attached to the rotor and the wire becomes part of the stator as shown
in figure 3. Again, an AC power source is used to produce a constantly varying magnetic field in
the stationary wire and the Lorentz force drives the magnet around the shaft. Note that this
brushless motor could not have been produced using the DC approach due to the dependency
on rotating commutators.
The brushless servomotor has a number of distinct advantages over conventional motors:
1. They have higher maximum speed and greater capacity.
2. They can be used in less favorable environments.
3. They require less maintenance.
4. They produced less noise.
Figure 3
4
Figure 4
5
When voltages are applied as in point A of figure 4c, magnetic flux generated as is shown in
figure 4a is orthogonal to the flux of the magnet. The motor is driven clockwise. By the time the
motor has rotated 60o, as shown in figure 4b, the applied sinusoidal voltages have also changed
as shown at point B in figure 4c. Once again, remember that the direction of winding for phases
U and W are reversed, so the composite flux continues to drive the shaft clockwise. Thus, by
generating three sinusoidal voltages, each 60o out of phase, the motor turns continuously.
At this point, you may be wondering why we call them DC Brushless motors when we continually
refer to AC power sources. Although it is true that an AC current must be produced to make
these motors operate, it is quite possible to produce the AC current using DC voltages. In fact, it
is possible to produce both positive and negative current using only positive DC voltage. We
accomplish this using elementary physics and clever wiring.
First, let us consider that the windings we have discussed in these motors are, in reality, large
inductors. Basic physics tells us that the current in an inductor can not be instantaneously
changed. Thus, if we apply a voltage as a step function, the current flowing through the inductor
will rise steadily as energy is stored in the inductor. If the voltage is applied long enough, current
will stabilize following Ohms Law, V=IR.
Likewise, if we shut off the voltage instantly, the current flow through the inductor will not drop to
zero instantly. Rather, energy stored in the inductor will continue to produce a current that
decays to zero. Now, consider what would happen if the voltage were turned on and off at a rate
which greatly exceeded the time constant of the inductor. By controlling the rate of this switching,
we can control the current flow through the inductor. For a DC brushless motor, this is done
using pulse width modulation (PWM).
Figure 5
Figure 5 shows a current sine wave, which we would like to create using only a DC voltage. For
the moment, lets consider this sine wave to have a peak current of Icc and minimum of zero.
Well worry about producing negative current later. Superimposed over the sine wave in figure 5
is a much higher frequency triangular chopping wave. Following Shannons sampling theorem,
this chopping wave has a minimum frequency of twice the sine wave frequency, but in practice
the chopping wave or carrier frequency is ten to thirty times the sine wave frequency.
Each time the rising chopping wave intersects the sine wave, voltage is applied to the inductor
(PWM on) and each time the falling chopping wave intersects the sine wave, voltage is turned off.
Figure 6
Figure 7
Consequently, feedback mechanisms are typically employed to control motor speed. The classic
algorithm used for this purpose is shown is figure 7, the Proportional-Integral controller. In this
case, a reference signal, r(n) is generated to indicate the desired motor speed. For the sake of
this example, lets assume that signal is a numerical value related to the motor speed in RPS.
The reference signal is fed to a control unit which, in turn, produces the sinusoid, u(t), sent to the
motor. The actual motor speed, which may change based upon load, is measured by some
sensor which produces a numerical value on the same scale as r(n).
The Proportional-Integral Controller is described by
U(i) = Kp(Ri-Yi) + KI
Kp
Ki
i
j=0(Rj-Yj)
4.1
The control unit considers two things in determining the signal to be applied to the motor next. A
proportional term considers only the difference between the present reference value and the
actual speed being measured. This term is weighted by a gain factor, Kp, derived using
knowledge of the specific motor under control.
The integral term considers the summation of all the error that has been measured previously.
This term serves to smooth out oscillations by damping the system. Consider, for example, the
case when the system measures the speed to be slightly less than the desired speed. The
proportional term would resolve to increase the applied power, speeding up the motor. If
however, the last several measurements had been showing the motor to be too fast (in other
words, we were slowing), the integral term would reduce or even prevent the introduction of more
power. In addition to this, the Integral term eliminates accumulated error. Since the amount of
energy introduced by the proportional term is proportional to the amount of error (how far the
motor speed is from the desired speed), its influence becomes very small when the motor is
close to the desired frequency. A very small error which has existed for many iterations of the
PID loop, however, will accumulate in the Integral term and produce a control change to correct
that error.
A third control term can be added to this equation, producing the Proportional-Integral-Derivative
algorithm or PID. The derivative term considers the rate at which the error is changing and helps
to improve settling time. One way to grasp the effect of the differential term is to imagine the
difference between a motor which is far from its target speed and one which is close. When the
motor is far below its target speed, we would like to accelerate at a maximum rate. If the rate at
which the motor accelerates is constant, then so too will be the rate at which the error changes
(i.e. the differential term). So, we would like to see the differential term increase to some constant
value. When we approach the target speed, wed like to begin reducing the rate at which the
motor is increasing its speed to prevent us from overshooting. In this case, wed like to see the
differential term decrease to zero. The full PID algorithm can be described by the equation:
u(t) = Kpe(t) + Ki eiT + Kd(de/dt)
4.2
Here,
Kp, Ki and Kd
T
e(t)
are gain factors for each of the three terms and are associated
with the motor's physical properties
is the sampling interval
is the error signal and equal to the difference between the target
speed and the measured speed
Notice that the integral term is described in discrete form as the summation of error terms,
measured at each sampling interval. Using a similar method, the differential term can be
discretely approximated as:
de/dt = (en - en-1 ) / T
4.3
Here en and en-1 are error signals calculated from the current and previous measurements.
This allows the analog PID algorithm to be approximated in discrete form as:
u(n) = Kpe(n) + Ki eiT + Kd[e(n) - e(n-1)] / T
4.4
In a control system, it is normally more important to know the change in control from interval to
interval, rather than the control signal itself. Thus, using induction, we can compute the control
signal for the (n-2)th interval as:
u(n-2) = Kpe(n-2) + Ki n-2 eiT + Kd[e(n-1) - e(n-2)] / T
4.5
This can be subtracted from the nth interval to determine the change in control signal. The
difference may be expressed as:
u(n) = u(n-1) + K1e(n) + K2e(n-1) + K3e(n-2)
4.6
are predetermined using one of several methods which take into account knowledge of the
unique physical system.
Implementing the PID algorithm on a digital controller allows the user to also implement adaptive
control. This is to say that the constants (K1, K2, and K3) can be dynamically modified to
improve the response of the system. For example, a given motor may be known to have a
different response to a given amount of power at one speed compared to another or under a
specific kind of load. In addition, completely different types of algorithms can be implemented by
reprogramming the controller. Deadbeat and Optimal controllers are sometimes used to meet
specific criteria. The Deadbeat control algorithm provides a very quick settling time, which comes
at the cost of a large overshoot. Optimal algorithms seek trade-offs for specific performance and
cost criteria.
Lastly, we should consider that there are many ways to gather information about the system
under control. Conceptually, the simplest is to produce an optical pulse train, which is
proportional to the speed of the motor. We could, however, choose to measure the back EMF.
Remember that in a three phase Y-connected motor, two of the loops are active at any given time
and one is idle. Back EMF is the amount of voltage generated across the idle winding and is
produced by the magnet moving over it. By measuring back EMF we can determine the speed
of the motor. We may also choose to measure the current flowing in the motor windings and
make adjustments to produce Sine Wave PWM. This information may also become an input fed
back to the control algorithm. In the next section, we will look at an algorithm implemented on
Hitachis SH-1 processor using both speed and current measurements to control a three-phase
motor.
10
11
AN0
AN1
Hitachi
SH/7034
TIOCA3
U+
TIOCB3
U-
TIOCA4
V+
TOCXA4
V-
TIOCB4
W+
TOCXB4
W-
Hall Sensors
IGBT
Switch
Block
IM
Optical Encoders
TCLKA
TCLKB
Figure 8
12
(5.1)
If we read the count of ITU channel 2 at regular intervals, lets say every 500 usec, we can
calculate the average speed during the interval as:
Speed = (Ending count Beginning count) / (50 * 10 6) * (4 * 1024)
(5.2)
Theres one important note with respect to the way we use channel 2 in this example. Since our
speed and position calculation is based on the counting of slots, our accuracy is a function of the
number of slots on the disk. If the difference between the ending count and beginning count in
our speed calculation is large, this may be adequate. However, if we increased the performance
of our system by reducing the sampling period below 500 usec, we may begin to care whether
the ending count just incremented or was just about to increment. Hitachis ITU provides a
solution for this, although it is not implemented in this example. Since we have not used channel
0, we may employ it to increase our accuracy.
Programming channel 0 to increment TCNT0 with the system clock and clear it on an input
capture does this. In this mode of operation, one of the signals, TCLKA or TCLKB is connected
to the Input Capture Port of channel 0. Each time this signal transitions, the fast incrementing
TCNT0 is cleared to zero. When the channel 1 timer interval expires, a quick read of TCNT0
provides an indication of the amount of time which has passed since the last increment of
TCNT2. This value, of course, is dependent on motor speed.
Channels 3 and 4 of the ITU are used to generate sinusoidal PWM signals. Referring back to
figure 5, we can produce a sinusoidal current in a motor coil by superimposing a high frequency
chopping wave over the target sinusoid. When the sinusoid intersects our chopping wave, we
turn the PWM output on or off depending upon the direction of the chopping wave. When
Channels 3 and 4 of Hitachis ITU are set to work in complementary PWM mode, six registers
13
Motor Reverses
Direction
TCLKA
TCLKB
TCNT2
Figure 9
Time
14
A few precautions must be considered, however, in adjusting the value in the control registers.
First, once weve determined that the value in the control register should change, we should wait
until the chopping wave has reached GRA3 or zero. Otherwise, we may change the value after
TCNT3 matched the control register, but before TCNT4 matched. Luckily, Hitachis ITU provides
an automatic mechanism for doing this. A set of buffer registers is provided for each of the
control registers. These registers are written with the new value and the ITU will automatically
perform the update at the next peak or valley of the chopping wave. A few special cases of
control register updating also need to be considered. If T is the difference between TCNT3 and
TCNT4, the non-overlapping distance, then let us define:
Then the following special precautions must be applied during the control register update:
If a control register is currently set to a value between Max(TCNT3) and Max(TCNT4), and the
next value is going to be outside this range, it must be done when TCNT4 underflows rather then
when TCNT3 overflows. The buffer register can still be used to update the control register, but
care must be taken to update the buffer register between the time of a TCNT3 overflow and
TCNT4 underflow.
If a control register is currently set to a value between Min(TCNT3) and Min(TCNT4), and the
next value is going to be outside this range, it must be done when TCNT3 overflows rather then
when TCNT4 underflows. The buffer register can still be used to update the control register, but
care must be taken to update the buffer register between the time of a TCNT4 underflow and
TCNT3 overflow.
If a control register is to be updated in such a way as to create a 0% duty cycle, writing a value
greater than GRA3 to the buffer register can do this. Care must be taken, however, to do it while
the chopping wave is decrementing. This is the time between a TCNT3 overflow and a TCNT4
underflow.
If a control register is to be updated in such a way as to create a 100% duty cycle, writing a value
greater than GRA3 to the buffer register can do this. Care must be taken, however, to do it while
the chopping wave is incrementing. This is the time between a TCNT4 underflow and a TCNT3
overflow.
15
5.2 The Two Directional Current Model for Three Phase Current
In section 3.0, we noted that the motor turned by virtue of sinusoidal currents, each 60o out of
phase with the other flowing in the three motor coils. We defined these three coils as U, V, and
W and determined that the duty cycle of the PWM signal controlled whether the current flowing in
each coil increased or decreased. Temporarily forgetting about the problem of controlling the
motor speed, then we must periodically determine where the motor shaft is in its angular rotation
(0-3600) and what the current flow is at that time in each coil. Using this information, we can then
determine what change to make in the current flow to continue producing the appropriate sine
wave.
The motor in our example is fitted with two Hall Effect sensors that measure the current flow in
the U and V coils. It is possible to determine the current flow in all three coils using a
mathematical transform. This reduces the total computation and measurement requirements of
the system. Referring back to figure 4, the amount of instantaneous current flow in each coil can
be described as:
iu = I sin t
iv = I sin (
t 60o)
iw = I sin (
t 120o)
(5.3)
(5.4)
(5.5)
Here t is the angular position of the shaft and I is the maximum current. The two-phase model
transforms the total current into a vertical D-axis and horizontal Q-axis. These currents are a
function of , the position of the shaft considering current loss in the motor. The two-phase
model currents derived from equations 5.3 to 5.5 are:
id()
) = (2)
-2 (sin * iv + sin (
+ 4/3
) * iv)
iq(
) = id(
+ /2)
(5.6)
(5.7)
For this discussion, we will ignore current loss within the motor, thus
= t
id = 0
iq = -(3/2 * I)-2
(5.8)
(5.9)
(5.10)
Although the theoretical value of id is zero in equation 5.9, the actual current is not zero due to
the back EMF produced in the inactive winding. We can also see that the current iq is
proportional to the maximum coil current, I. I is the current produced when we set a duty cycle of
0% or 100% in the ITU control register.
Remember that in our system, we use Hall Effect sensors to measure iu and iv. We also know
the exact shaft position, , from equation 5.1. Thus we can determine the actual value of id and
iq in the motor at the present time. There are two things that must be done at this point. If the
motor speed is exactly equal to our target value, the current flow in each coil must be adjusted to
continue producing a sinusoidal current of the appropriate phase for the shaft position at that
time. The measured value of id, the back EMF current, is used to determine what change to
make. Secondly, a PID algorithm is performed using the speed information calculated in equation
5.2. The PID algorithm determines what additional change should be made to coil current, to
speed up or slow the motor. Its output value is called iq* (the calculation of iq* is explained in
the Speed Control Code below). The measured iq and the target iq* are used to determine
what change to make. Therefore, we have
iderr = 0 id
(5.11)
16
iqerr = iq* - iq
(5.12)
(5.13)
(5.14)
The summations here represent the summation of all previous iderr and iqerr. Ki and Kp are
gain constants. We have chosen Ki=89 and Kp=3 for our demonstration system. Next, we must
correct for back EMF distortion. Remember that the current values we have measured with the
A/D converter include information about both the current we have supplied via our switch block
and currrent which was induced by back EMF. Back EMF can be determined from the measured
current, iv, when the motor position is such that the input power from the switch block is zero.
We account for the distortion produced by back EMF to determine a target Vd and Vq through
non-interacting control.
Vd = Vzd + * L * iq
Vq = Vzq + * (M * Vemf L * id)
(5.15)
(5.16)
In this case,
= the location of the motor
L = the coil inductance which is a physical property of the motor
M = the complementary inductance which is a physical property of the motor
Vemf = the back EMF
Lastly, we must convert the the two-phase voltages we have calculated back to a three-phase
model. Reversing the procedure used in equations 5.3 to 5.7, we produce
Vu = (2/3)-2 (Vd * sin + Vq * sin (
+ /4))
Vv = (2/3)-2 (Vd * sin (
+ 2/3)
/3) + Vq * sin (
+ 11
/12))
Vw = -Vu Vv
(5.17)
(5.18)
(5.19)
Vu, Vv, and Vw become our new control register values in the ITU.
17
18
6.1 PID.h
/*
Name:
Version:
Date:
Author:
PID.h
1.0
7/97
Ken Schultz
/* Constants */
const unsigned int Ki = 89;
const unsigned int Kp = 3;
const unsigned int Kd = 10;
const unsigned int T = 1;
const unsigned int windings = 5;
const unsigned int Rl = 2;
const unsigned int const240 = (240*512)/360;
const unsigned int const90 = (90*512)/360;
const unsigned int const330 = (330*512)/360;
const unsigned int DeadTime = 0x20;
const unsigned int T3_min = 0x1f;
const unsigned int T3_max = 0x2d6;
const unsigned int T4_max = 0x2b7;
/* Globals */
signed int i_correction;
/* an output from PID_Calc, our new current command */
signed int Vd;
/* d phase voltage for current correction routine */
signed int Vq;
/* q phase voltage for current correction routine */
unsigned int ITU2_flag;
/* count of how many times ITU2 overflowed */
unsigned int last_ITU2;
/* how many times ITU2 overflowed last iteration*/
unsigned int target_speed;
/* the speed we are commanding the motor to turn */
unsigned int sel_u, sel_v, sel_w;/* flags indicating which phase to adjust next */
unsigned int current_speed;
/* calculated value from Speed_Calc routine */
unsigned int current_position; /* calculated value from Speed_Calc routine */
signed int K[3];
/* array of calculated PID gain factors */
signed int error[3];
/* array to hold current and previous speed errors */
signed int error_id[3];
/* array for Current Correction PID */
signed int error_iq[3];
/* array for Current Correction PID */
signed long sygd;
/* used by coil current calculation */
signed long sygq;
/* used by coil current calculation */
unsigned int data_u;
/* the next u phase ITU value from coil current calc */
unsigned int data_v;
/* the next v phase ITU value from coil current calc */
unsigned int data_w;
/* the next w phase ITU value from coil current calc */
unsigned char U100_set;
/* flag used by T3INT to know that phase must be set */
19
SinInit.h
Stacia Lawson
8/25/97
1.0
This header initializes the Sine Wave table for the PID algorithm
20
0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0f, 0x010,
0x011, 0x013, 0x014, 0x016, 0x017, 0x019, 0x01b, 0x01c, 0x01e, 0x020,
0x022, 0x024, 0x026, 0x028, 0x02a, 0x02c, 0x02e, 0x030, 0x033, 0x035,
0x037, 0x03a, 0x03c, 0x03f, 0x041, 0x044, 0x046, 0x049, 0x04c, 0x04e,
0x051, 0x054, 0x057, 0x05a, 0x05d, 0x060, 0x063, 0x066, 0x069, 0x06c,
0x070, 0x073, 0x076, 0x079, 0x07d, 0x080, 0x084, 0x087, 0x08a, 0x08e,
0x092, 0x095, 0x099, 0x09c, 0x0a0, 0x0a4, 0x0a8, 0x0ab, 0x0af, 0x0b3,
0x0b7, 0x0bb, 0x0bf, 0x0c3, 0x0c7, 0x0cb, 0x0cf, 0x0d3, 0x0d7, 0x0db,
0x0df, 0x0e3, 0x0e7, 0x0eb, 0x0ef, 0x0f4, 0x0f8, 0x0fc, 0x0100, 0x0105,
0x0109, 0x010d, 0x0111, 0x0116, 0x011a, 0x011e, 0x0123, 0x0127, 0x012c, 0x0130,
0x0134, 0x0139, 0x013d, 0x0142, 0x0146, 0x014a, 0x014f, 0x0153, 0x0158, 0x015c,
0x0161, 0x016a
};
/* end of Sin Table Initialization */
21
6.2 7032.h
/************************************************************************/
/*
SH7032 Include File
Ver 1.0
*/
/************************************************************************/
struct st_sci {
/* struct SCI
*/
union {
/* SMR
*/
unsigned char BYTE;
/* Byte Access */
struct {
/* Bit Access */
unsigned char CA :1;
/*
C/A
*/
unsigned char CHR :1;
/*
CHR
*/
unsigned char PE :1;
/*
PE
*/
unsigned char OE :1;
/*
O/E
*/
unsigned char STOP:1;
/*
STOP
*/
unsigned char MP :1;
/*
MP
*/
unsigned char CKS :2;
/*
CKS
*/
}
BIT;
/*
*/
}
SMR;
/*
*/
unsigned char
BRR;
/* BRR
*/
union {
/* SCR
*/
unsigned char BYTE;
/* Byte Access */
struct {
/* Bit Access */
unsigned char TIE :1;
/*
TIE
*/
unsigned char RIE :1;
/*
RIE
*/
unsigned char TE :1;
/*
TE
*/
unsigned char RE :1;
/*
RE
*/
unsigned char MPIE:1;
/*
MPIE
*/
unsigned char TEIE:1;
/*
TEIE
*/
unsigned char CKE :2;
/*
CKE
*/
}
BIT;
/*
*/
}
SCR;
/*
*/
unsigned char
TDR;
/* TDR
*/
union {
/* SSR
*/
unsigned char BYTE;
/* Byte Access */
struct {
/* Bit Access */
unsigned char TDRE:1;
/*
TDRE
*/
unsigned char RDRF:1;
/*
RDRF
*/
unsigned char ORER:1;
/*
ORER
*/
unsigned char FER :1;
/*
FER
*/
unsigned char PER :1;
/*
PER
*/
unsigned char TEND:1;
/*
TEND
*/
unsigned char MPB :1;
/*
MPB
*/
unsigned char MPBT:1;
/*
MPBT
*/
}
BIT;
/*
*/
}
SSR;
/*
*/
unsigned char
RDR;
/* RDR
*/
char
wk[2];
/*
*/
};
/*
*/
struct st_ad {
/* struct A/D
*/
unsigned short
DRA;
/* ADDRA
*/
unsigned short
DRB;
/* ADDRB
*/
unsigned short
DRC;
/* ADDRC
*/
unsigned short
DRD;
/* ADDRD
*/
union {
/* ADCSR
*/
unsigned char BYTE;
/* Byte Access */
struct {
/* Bit Access */
unsigned char ADF :1;
/*
ADF
*/
unsigned char ADIE:1;
/*
ADIE
*/
unsigned char ADST:1;
/*
ADST
*/
unsigned char SCAN:1;
/*
SCAN
*/
unsigned char CKS :1;
/*
CKS
*/
22
unsigned char CH
}
BIT;
CSR;
:3;
}
union {
unsigned char BYTE;
struct {
unsigned char TRGE:1;
}
BIT;
}
CR;
};
struct st_itu {
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TSTR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TSNC;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TMDR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TFCR;
char
wk[45];
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
wk :3;
STR4:1;
STR3:1;
STR2:1;
STR1:1;
STR0:1;
wk :3;
SYNC4:1;
SYNC3:1;
SYNC2:1;
SYNC1:1;
SYNC0:1;
wk :1;
MDF :1;
FDIR:1;
PWM4:1;
PWM3:1;
PWM2:1;
PWM1:1;
PWM0:1;
wk :2;
CMD :2;
BFB4:1;
BFA4:1;
BFB3:1;
BFA3:1;
wk :6;
OLS4:1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
CH
ADCR
Byte Access
Bit Access
TRGE
struct ITU
TSTR
Byte Access
Bit Access
STR4
STR3
STR2
STR1
STR0
TSNC
Byte Access
Bit Access
SYNC4
SYNC3
SYNC2
SYNC1
SYNC0
TMDR
Byte Access
Bit Access
MDF
FDIR
PWM4
PWM3
PWM2
PWM1
PWM0
TFCR
Byte Access
Bit Access
CMD
BFB4
BFA4
BFB3
BFA3
TOCR
Byte Access
Bit Access
OLS4
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
23
}
};
struct st_itu0 {
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TCR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TIOR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TIER;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TSR;
unsigned short
TCNT;
unsigned short
GRA;
unsigned short
GRB;
};
struct st_itu3 {
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TCR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
wk :1;
CCLR:2;
CKEG:2;
TPSC:3;
wk :1;
IOB:3;
:1;
IOA:3;
wk
:5;
OVIE :1;
IMIEB:1;
IMIEA:1;
wk :5;
OVF :1;
IMFB:1;
IMFA:1;
wk :1;
CCLR:2;
CKEG:2;
TPSC:3;
wk :1;
IOB:3;
:1;
IOA:3;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
OLS3
struct ITU0
TCR
Byte Access
Bit Access
CCLR
CKEG
TPSC
TIOR
Byte Access
Bit Access
IOB
IOA
TIER
Byte Access
Bit Access
OVIE
IMIEB
IMIEA
TSR
Byte Access
Bit Access
OVF
IMFB
IMFA
TCNT
GRA
GRB
struct ITU3
TCR
Byte Access
Bit Access
CCLR
CKEG
TPSC
TIOR
Byte Access
Bit Access
IOB
IOA
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
24
}
TIOR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TIER;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TSR;
unsigned short
TCNT;
unsigned short
GRA;
unsigned short
GRB;
unsigned short
BRA;
unsigned short
BRB;
char
wk[2];
wk
:5;
OVIE :1;
IMIEB:1;
IMIEA:1;
wk :5;
OVF :1;
IMFB:1;
IMFA:1;
};
union un_dmac {
unsigned short
struct {
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
}
WORD;
short
short
short
short
short
short
BIT;
wk
PR
:6;
:2;
:5;
AE :1;
NMIF:1;
DME :1;
};
struct st_dmac0 {
void
*SAR;
void
*DAR;
char
wk1[2];
unsigned short TCR;
char
wk2[2];
union {
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
CHCR;
};
struct st_intc {
union {
unsigned short WORD;
DM:2;
SM:2;
RS:4;
AM:1;
AL:1;
DS:1;
TM:1;
TS:1;
IE:1;
TE:1;
DE:1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
*/
TIER
*/
Byte Access */
Bit Access */
*/
OVIE
*/
IMIEB
*/
IMIEA
*/
*/
*/
TSR
*/
Byte Access */
Bit Access */
*/
OVF
*/
IMFB
*/
IMFA
*/
*/
*/
TCNT
*/
GRA
*/
GRB
*/
BRA
*/
BRB
*/
*/
*/
union DMAC
*/
Word Access */
Bit Access */
*/
PR
*/
*/
AE
*/
NMIF
*/
DME
*/
*/
*/
struct DMAC0 */
SAR
*/
DAR
*/
*/
TCR
*/
*/
CHCR
*/
Word Access */
Bit Access */
DM
*/
SM
*/
RS
*/
AM
*/
AL
*/
DS
*/
TM
*/
TS
*/
IE
*/
TE
*/
DE
*/
*/
*/
*/
struct INTC */
IPRA
*/
Word Access */
25
union
union
union
union
union
struct {
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
IPRA;
{
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
IPRB;
{
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
IPRC;
{
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
IPRD;
{
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
}
BIT;
}
IPRE;
{
unsigned short WORD;
struct {
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
}
ICR;
};
struct st_ubc {
void
unsigned long
union {
*BAR;
BAMR;
UU:4;
UL:4;
LU:4;
LL:4;
UU:4;
UL:4;
LU:4;
LL:4;
UU:4;
UL:4;
LU:4;
LL:4;
UU:4;
UL:4;
LU:4;
LL:4;
UU:4;
UL:4;
LU:4;
NMIL :1;
:6;
NMIE :1;
IRQ0S:1;
IRQ1S:1;
IRQ2S:1;
IRQ3S:1;
IRQ4S:1;
IRQ5S:1;
IRQ6S:1;
IRQ7S:1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
Bit Access
IRQ0
IRQ1
IRQ2
IRQ3
IPRB
Word Access
Bit Access
IRQ4
IRQ5
IRQ6
IRQ7
IPRC
Word Access
Bit Access
DMAC0,1
DMAC2,3
ITU0
ITU1
IPRD
Word Access
Bit Access
ITU2
ITU3
ITU4
SCI0
IPRE
Word Access
Bit Access
SCI1
PRT,A/D
WDT,REF
ICR
Word Access
Bit Access
NMIL
NMIE
IRQ0S
IRQ1S
IRQ2S
IRQ3S
IRQ4S
IRQ5S
IRQ6S
IRQ7S
struct UBC
BAR
BAMR
BBR
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
26
unsigned short
WORD;
struct {
unsigned short wk:8;
unsigned short CD:2;
unsigned short ID:2;
unsigned short RW:2;
unsigned short SZ:2;
}
BIT;
}
BBR;
};
struct st_bsc {
union {
unsigned short
WORD;
struct {
unsigned short DRAME:1;
unsigned short IOE :1;
unsigned short WARP :1;
unsigned short RDDTY:1;
unsigned short BAS :1;
}
BIT;
}
BCR;
union {
unsigned short
WORD;
struct {
unsigned short RW7:1;
unsigned short RW6:1;
unsigned short RW5:1;
unsigned short RW4:1;
unsigned short RW3:1;
unsigned short RW2:1;
unsigned short RW1:1;
unsigned short RW0:1;
unsigned short
:6;
unsigned short WW1:1;
}
BIT;
}
WCR1;
union {
unsigned short
WORD;
struct {
unsigned short DRW7:1;
unsigned short DRW6:1;
unsigned short DRW5:1;
unsigned short DRW4:1;
unsigned short DRW3:1;
unsigned short DRW2:1;
unsigned short DRW1:1;
unsigned short DRW0:1;
unsigned short DWW7:1;
unsigned short DWW6:1;
unsigned short DWW5:1;
unsigned short DWW4:1;
unsigned short DWW3:1;
unsigned short DWW2:1;
unsigned short DWW1:1;
unsigned short DWW0:1;
}
BIT;
}
WCR2;
union {
unsigned short
WORD;
struct {
unsigned short WPU :1;
unsigned short A02LW:2;
unsigned short A6LW :2;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
Word Access */
Bit Access */
*/
CD
*/
ID
*/
RW
*/
SZ
*/
*/
*/
*/
struct BSC
*/
BCR
*/
Word Access */
Bit Access */
DRAME
*/
IOE
*/
WARP
*/
RDDTY
*/
BAS
*/
*/
*/
WCR1
*/
Word Access */
Bit Access */
RW7
*/
RW6
*/
RW5
*/
RW4
*/
RW3
*/
RW2
*/
RW1
*/
RW0
*/
*/
WW1
*/
*/
*/
WCR2
*/
Word Access */
Bit Access */
DRW7
*/
DRW6
*/
DRW5
*/
DRW4
*/
DRW3
*/
DRW2
*/
DRW1
*/
DRW0
*/
DWW7
*/
DWW6
*/
DWW5
*/
DWW4
*/
DWW3
*/
DWW2
*/
DWW1
*/
DWW0
*/
*/
*/
WCR3
*/
Word Access */
Bit Access */
WPU
*/
A02LW
*/
A6LW
*/
27
}
BIT;
}
WCR3;
union {
unsigned short
WORD;
struct {
unsigned short CW2 :1;
unsigned short RASD:1;
unsigned short TPC :1;
unsigned short BE :1;
unsigned short CDTY:1;
unsigned short MXE :1;
unsigned short MXC :2;
}
BIT;
}
DCR;
union {
unsigned short
WORD;
struct {
unsigned short PEF :1;
unsigned short PFRC:1;
unsigned short PEO :1;
unsigned short PCHK:2;
}
BIT;
}
PCR;
union {
unsigned short
WORD;
struct {
unsigned short wk
:8;
unsigned short RFSHE:1;
unsigned short RMODE:1;
unsigned short RLW :2;
}
BIT;
}
RCR;
union {
unsigned short
WORD;
struct {
unsigned short wk :8;
unsigned short CMF :1;
unsigned short CMIE:1;
unsigned short CKS :3;
}
BIT;
}
RTCSR;
unsigned short
RTCNT;
unsigned short
RTCOR;
};
union un_sbycr {
unsigned char
BYTE;
struct {
unsigned char SBY:1;
unsigned char HIZ:1;
}
BIT;
};
struct st_pa {
union {
unsigned short
WORD;
struct {
unsigned short B15:1;
unsigned short B14:1;
unsigned short B13:1;
unsigned short B12:1;
unsigned short B11:1;
unsigned short B10:1;
unsigned short B9 :1;
unsigned short B8 :1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
DCR
Word Access
Bit Access
CW2
RASD
TPC
BE
CDTY
MXE
MXC
PCR
Word Access
Bit Access
PEF
PFRC
PEO
PCHK
RCR
Word Access
Bit Access
RFSHE
RMODE
RLW
RTCSR
Word Access
Bit Access
CMF
CMIE
CKS
RTCNT
RTCOR
union SBYCR
Byte Access
Bit Access
SBY
HIZ
struct PA
PADR
Word Access
Bit Access
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
28
unsigned short B7
unsigned short B6
unsigned short B5
unsigned short B4
unsigned short B3
unsigned short B2
unsigned short B1
unsigned short B0
}
BIT;
DR;
:1;
:1;
:1;
:1;
:1;
:1;
:1;
:1;
}
};
struct st_pc {
union {
unsigned short
WORD;
struct {
unsigned short wk:8;
unsigned short B7:1;
unsigned short B6:1;
unsigned short B5:1;
unsigned short B4:1;
unsigned short B3:1;
unsigned short B2:1;
unsigned short B1:1;
unsigned short B0:1;
}
BIT;
}
DR;
};
struct st_pfc {
union {
unsigned short
WORD;
struct {
unsigned short B15:1;
unsigned short B14:1;
unsigned short B13:1;
unsigned short B12:1;
unsigned short B11:1;
unsigned short B10:1;
unsigned short B9 :1;
unsigned short B8 :1;
unsigned short B7 :1;
unsigned short B6 :1;
unsigned short B5 :1;
unsigned short B4 :1;
unsigned short B3 :1;
unsigned short B2 :1;
unsigned short B1 :1;
unsigned short B0 :1;
}
BIT;
}
PAIOR;
union {
unsigned short
WORD;
struct {
unsigned short B15:1;
unsigned short B14:1;
unsigned short B13:1;
unsigned short B12:1;
unsigned short B11:1;
unsigned short B10:1;
unsigned short B9 :1;
unsigned short B8 :1;
unsigned short B7 :1;
unsigned short B6 :1;
unsigned short B5 :1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
Bit
Bit
Bit
Bit
Bit
Bit
Bit
Bit
7
6
5
4
3
2
1
0
struct PC
PCDR
Word Access
Bit Access
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
struct PFC
PAIOR
Word Access
Bit Access
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
PBIOR
Word Access
Bit Access
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
29
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
}
BIT;
PBIOR;
B4
B3
B2
B1
B0
:1;
:1;
:1;
:1;
:1;
}
union {
unsigned short
WORD;
struct {
unsigned short MD15:2;
unsigned short MD14:2;
unsigned short MD13:2;
unsigned short MD12:2;
unsigned short MD11:2;
unsigned short MD10:2;
unsigned short MD9 :2;
unsigned short
:1;
unsigned short MD8 :1;
}
BIT;
}
PACR1;
union {
unsigned short
WORD;
struct {
unsigned short wk :1;
unsigned short MD7:1;
unsigned short
:1;
unsigned short MD6:1;
unsigned short
:1;
unsigned short MD5:1;
unsigned short
:1;
unsigned short MD4:1;
unsigned short MD3:2;
unsigned short MD2:2;
unsigned short MD1:2;
unsigned short MD0:2;
}
BIT;
}
PACR2;
union {
unsigned short
WORD;
struct {
unsigned short MD15:2;
unsigned short MD14:2;
unsigned short MD13:2;
unsigned short MD12:2;
unsigned short MD11:2;
unsigned short MD10:2;
unsigned short MD9 :2;
unsigned short MD8 :2;
}
BIT;
}
PBCR1;
union {
unsigned short
WORD;
struct {
unsigned short MD7:2;
unsigned short MD6:2;
unsigned short MD5:2;
unsigned short MD4:2;
unsigned short MD3:2;
unsigned short MD2:2;
unsigned short MD1:2;
unsigned short MD0:2;
}
BIT;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
Bit
Bit
Bit
Bit
Bit
4
3
2
1
0
PACR1
Word Access
Bit Access
PA15MD
PA14MD
PA13MD
PA12MD
PA11MD
PA10MD
PA9MD
PA8MD
PACR2
Word Access
Bit Access
PA7MD
PA6MD
PA5MD
PA4MD
PA3MD
PA2MD
PA1MD
PA0MD
PBCR1
Word Access
Bit Access
PB15MD
PB14MD
PB13MD
PB12MD
PB11MD
PB10MD
PB9MD
PB8MD
PBCR2
Word Access
Bit Access
PB7MD
PB6MD
PB5MD
PB4MD
PB3MD
PB2MD
PB1MD
PB0MD
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
30
}
PBCR2;
char
wk[30];
union {
unsigned short
WORD;
struct {
unsigned short CASHMD:2;
unsigned short CASLMD:2;
}
BIT;
}
CASCR;
};
struct st_tpc {
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TPMR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
TPCR;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
NDERB;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
NDERA;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
wk
:4;
G3NOV:1;
G2NOV:1;
G1NOV:1;
G0NOV:1;
G3CMS:2;
G2CMS:2;
G1CMS:2;
G0CMS:2;
B15:1;
B14:1;
B13:1;
B12:1;
B11:1;
B10:1;
B9 :1;
B8 :1;
B7:1;
B6:1;
B5:1;
B4:1;
B3:1;
B2:1;
B1:1;
B0:1;
B15:1;
B14:1;
B13:1;
B12:1;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
CASCR
Word Access
Bit Access
CASHMD
CASLMD
struct TPC
TPMR
Byte Access
Bit Access
G3NOV
G2NOV
G1NOV
G0NOV
TPCR
Byte Access
Bit Access
G3CMS
G2CMS
G1CMS
G0CMS
NDERB
Byte Access
Bit Access
NDER15
NDER14
NDER13
NDER12
NDER11
NDER10
NDER9
NDER8
NDERA
Byte Access
Bit Access
NDER7
NDER6
NDER5
NDER4
NDER3
NDER2
NDER1
NDER0
NDRB (H'F4)
Byte Access
Bit Access
NDR15
NDR14
NDR13
NDR12
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
31
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
NDRB1;
}
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
NDRA1;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
NDRB2;
union {
unsigned char BYTE;
struct {
unsigned char
unsigned char
unsigned char
unsigned char
unsigned char
}
BIT;
}
NDRA2;
};
B11:1;
B10:1;
B9 :1;
B8 :1;
B7:1;
B6:1;
B5:1;
B4:1;
B3:1;
B2:1;
B1:1;
B0:1;
wk :4;
B11:1;
B10:1;
B9 :1;
B8 :1;
wk:4;
B3:1;
B2:1;
B1:1;
B0:1;
/*
NDR11
/*
NDR10
/*
NDR9
/*
NDR8
/*
/*
/* NDRA (H'F5)
/* Byte Access
/* Bit Access
/*
NDR7
/*
NDR6
/*
NDR5
/*
NDR4
/*
NDR3
/*
NDR2
/*
NDR1
/*
NDR0
/*
/*
/* NDRB (H'A6)
/* Byte Access
/* Bit Access
/*
/*
NDR11
/*
NDR10
/*
NDR9
/*
NDR8
/*
/*
/* NDRA (H'A7)
/* Byte Access
/* Bit Access
/*
/*
NDR3
/*
NDR2
/*
NDR1
/*
NDR0
/*
/*
/*
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
32
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
SCI0
(*(volatile
SCI1
(*(volatile
AD
(*(volatile
ITU
(*(volatile
ITU0
(*(volatile
ITU1
(*(volatile
ITU2
(*(volatile
ITU3
(*(volatile
ITU4
(*(volatile
DMAC
(*(volatile
DMAC0
(*(volatile
DMAC1
(*(volatile
DMAC2
(*(volatile
DMAC3
(*(volatile
INTC
(*(volatile
UBC
(*(volatile
BSC
(*(volatile
SBYCR
(*(volatile
PA
(*(volatile
PB
(*(volatile
PC
(*(volatile
PFC
(*(volatile
TPC
(*(volatile
st_itu1 st_itu0
st_itu2 st_itu0
st_itu4 st_itu3
st_dmac1 st_dmac0
st_dmac2 st_dmac0
st_dmac3 st_dmac0
st_pb st_pa
struct
struct
struct
struct
struct
struct
struct
struct
struct
union
struct
struct
struct
struct
struct
struct
struct
union
struct
struct
struct
struct
struct
st_sci
st_sci
st_ad
st_itu
st_itu0
st_itu0
st_itu0
st_itu3
st_itu3
un_dmac
st_dmac0
st_dmac0
st_dmac0
st_dmac0
st_intc
st_ubc
st_bsc
un_sbycr
st_pa
st_pa
st_pc
st_pfc
st_tpc
*)0x5FFFEC0)/* SCI0
*)0x5FFFEC8)/* SCI1
*)0x5FFFEE0)/* A/D
*)0x5FFFF00)/* ITU
*)0x5FFFF04)/* ITU0
*)0x5FFFF0E)/* ITU1
*)0x5FFFF18)/* ITU2
*)0x5FFFF22)/* ITU3
*)0x5FFFF32)/* ITU4
*)0x5FFFF48)/* DMAC
*)0x5FFFF40)/* DMAC0
*)0x5FFFF50)/* DMAC1
*)0x5FFFF60)/* DMAC2
*)0x5FFFF70)/* DMAC3
*)0x5FFFF84)/* INTC
*)0x5FFFF90)/* UBC
*)0x5FFFFA0)/* BSC
*)0x5FFFFBC)/* SBYCR
*)0x5FFFFC0)/* PA
*)0x5FFFFC2)/* PB
*)0x5FFFFD0)/* PC
*)0x5FFFFC4)/* PFC
*)0x5FFFFF0)/* TPC
/* Change Struct
/* Change Struct
/* Change Struct
/* Change Struct
/* Change Struct
/* Change Struct
/* Change Struct
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
Address*/
ITU1
*/
ITU2
*/
ITU4
*/
DMAC1 */
DMAC2 */
DMAC3 */
PB->PA */
33
6.3 VECT.asm
;-----------------------------------------------------------------------------;
; VECT.ASM
;
; SH Series Assembler Startup Program
; Copyright (c) 1995, Hitachi Micro Systems,Inc.
;
; Set up the vector table and irq for a simple SH C program.
;
;----------------------------------------------------------.SECTION
.IMPORT
.EXPORT
.EXPORT
.EXPORT
.IMPORT
.IMPORT
.IMPORT
.IMPORT
VECT,CODE,ALIGN=4
__INIT
START
__DOSLEEP
BEGIN
_ITU2_OVF
_TM1
_T3INT
_T4INT
BEGIN
STACK
BEGIN
; vector 0, initial PC
; vector 1, initial SP
; vector 2, manual reset
.DATA.L
STACK
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
PC
SP
34
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
NoVect
35
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
36
NOP
O_STACK:
O_INIT:
.ALIGN 4
.DATA.L
.DATA.L
STACK
__INIT
0
0
RTE
.DATA.W
.DATA.W
;----------------------------------------------------------; Stack.
.SECTION
.RES.L
0
0
S,STACK,ALIGN=4
256
STACK:
.END
37
6.4 Init.c
/* init.c: program initialization */
extern void _INIT(void);
extern void _INITSCT(void);
extern void _DOSLEEP(void);
extern void main(void);
#if defined(USES_SIMIO) || defined(LCEVB)
extern void _INIT_IOLIB(void);
extern void _CLOSEALL(void);
#endif
void _INIT()
{
_INITSCT();
#if defined(USES_SIMIO) || defined(LCEVB)
_INIT_IOLIB();
#endif
main();
#if defined(USES_SIMIO) || defined(LCEVB)
_CLOSEALL();
#endif
_DOSLEEP();
6.5 Initsct.c
extern int *_D_ROM, *_B_BGN, *_B_END, *_D_BGN, *_D_END;
extern void _INITSCT();
void _INITSCT()
{
int *p, *q;
for (p=_B_BGN; p<_B_END; p++)
*p=0;
for (p=_D_BGN, q=_D_ROM; p<_D_END; p++, q++)
*p=*q;
}
38
6.6 Sect.asm
.SECTION
.SECTION
.SECTION
.SECTION
__D_ROM
__D_BGN
__D_END
__B_BGN
__B_END
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.DATA.L
.EXPORT
.EXPORT
.EXPORT
.EXPORT
.EXPORT
.END
D,DATA,ALIGN=4
R,DATA,ALIGN=4
B,DATA,ALIGN=4
C,DATA,ALIGN=4
(STARTOF D)
(STARTOF R)
(STARTOF R) + (SIZEOF R)
(STARTOF B)
(STARTOF B) + (SIZEOF B)
__D_ROM
__D_BGN
__D_END
__B_BGN
__B_END
39
6.7 Main.c
/*
MAIN.CVersion 1.0 7/97 Ken Schultz
INPUTS: None
OUTPUTS: None
Function:
After initialization code has set the stack pointer and initialized
the segments, control is passed to Main. Main does the following:
1. Call Initialization routine to set up ITU, ports, interrupts.
2. Start the counters running after all set up is complete.
3. Enter an infinite loop.
All of the control function is triggered to execute by interrupt
handlers. This program uses uses 5 main interrupt handlers:
1. IMIA2 executes when ITU 2 underflows. This simply causes us to
decrement a flag so we can keep track of the total ITU2 count.
2. OVF2 executes when ITU2 overflows. Much like IMIA2, we now
increment the flag to keep track of the total. count.
3. TM1 executes when ITU1 matches GRA2. Timer 1 is set up to produce
and interrupt once every 500 usec if the SH/7034 is running at 20MHz.
The TM1 handler evokes the code to execute an iteration of the PID and
adjust the motor control vaules.
4. T3INT executes when a PWM buffer register needs to be specifically
updated during the transition from chopping wave rising to falling.
This interrupt is only enabled if a buffer register update has been
made.
5. T4INT executes when a PWM buffer register needs to be specifically
updated during the transition from chopping wae falling to rising.
This interrrupt is only enabled if a buffer register update has been
made.
Main include the following header files:
1. 7032.h defines structures which allow us to reference register
using symbolic names.
2. SHCPU.h defines volitale pointers which allow us to make memory
mapped access to SH registers using symbolic names.
3. PID.h defines symbolic names unique to this program.
Other header files may be conditionally included, however, they are
only used to include functions and definitions need when using the
simulator or evaluation board monitor.
40
*/
#if defined(USES_SIMIO) || defined(LCEVB)
#include <stdio.h>
#endif
#ifdef LCEVB
#define PBIOR (*(volatile short int *)(0x5ffffc6))
#define PBCR1 (*(volatile short int *)(0x5ffffcc))
#define PBCR2 (*(volatile short int *)(0x5ffffce))
#define PBDR (*(volatile short int *)(0x5ffffc2))
#endif
#include "7032.h"
#include "pid.h"
main()
{
Init();
ITU.TSTR.BYTE = 0xfe;
for (;;);
/* initialize peripherals */
/* start timers running */
/* run forever */
}
Init (void)
{
/*
Name:
Version:
Date:
Author:
Init
1.0
7/25/97
Ken Schultz/Hitachi Ltd.
41
*/
/* Next, initialize the Bus Controller. This initializations */
/* were chosen for compatibility with the SH-1 eval board. The */
/* Wait State Control register is not initialized since it uses */
/* 1 wait state by default values. */
/* No DRAM=0, Area 6 nonmultiplexed = 0, No Warp mode = 0 */
/* 50% duty cycle on RD = 0, LBS/HBS enabled = 1 */
BSC.BCR.WORD = 0x0800;
ITU1.TIOR.BYTE = 0x2a;
temp_char = ITU1.TSR.BYTE;
ITU1.TSR.BYTE = 0xf8;
ITU1.TIER.BYTE = 0x79;
ITU1.GRA = 0x04e2;
ITU1.TCNT = 0x0000;
ITU2.TIOR.BYTE = 0x2a;
temp_char = ITU2.TSR.BYTE;
ITU2.TSR.BYTE = 0xf8;
ITU2.TIER.BYTE = 0x7d;
ITU2.GRA = 0xffff;
ITU2.TCNT = 0x0000;
42
PA.DR.WORD = 0x0000;
PB.DR.WORD = 0x0000;
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
43
PFC.PAIOR.WORD = 0xcfff;
PFC.PBIOR.WORD = 0xff3f;
Speed_Calc(void)
{
/*
Name:
Verion:
Date:
Author:
Inputs:
Outputs:
Speed_Calc
1.0
7/27/97
Ken Schultz/Hitachi Ltd.
ITU2_flag = the number of overflows of TCNT2
TCNT2 = the current count of the ITU2 counter
Last_ITU2 = the dword ITU2 count from last iteration
Current_Speed = the speed calculated this time
Current_Positon = the position calculated this time
Function:
Speed_Calc is called by TM1 every 500 usec. Speed_Calc uses data
from ITU channel 2 to determine the motors speed and location.
When ITU2 was put into phase counting mode, TCNT2 began to
increment 4 times for each slot that passed the optical sensor or
decrement 4 times if the motor changed direction. Each time
TCNT2 overflows from 0xffff to 0x0000, ITU2_OVF has incremented
ITU2_flag. Thus the dword composed of ITU2_flag and TCNT2
44
PID_Calc(void)
{
/*
Name:
Version:
Date:
Author:
Inputs:
Outputs:
Function:
PID_Calc
1.0
7/27/97
Ken Schultz/Hitachi Ltd.
Current_Speed
Current_Position
Target_Speed
i_correction = new current value to Current_Calc
45
Coil_Current_Calc(void)
{
/*
Name:
Coil_Current_Calc
Version:
1.0
Date:
8/17/97
Author:
Ken Schultz/Hitachi Ltd.
Inputs:
i_correction = new current value from PID
current_position
sygd
sygq
sin = array of sin values
Outputs:
data_u
data_v
data_w
Function:
Coil_Current_Correction runs at each iteration of the PID loop.
It's function is to read current data on the u and v phase and
determine the voltage present in those phase currently. This
information, combined with a knowledge of the current position
allows us to perform a three phase to two phase transformation.
Since we know the current position of the motor (determined during
speed_calc), we know what the correct voltages should be at this
position and can perform a correction on the ITU values to obtain
the correct voltage in each phase for this position. In addition,
we use the value of "i_correction" determined in the PID routine
make an additional adjustment for speed correction.
Remember that if we the motor is spinning at exactly the correct
speed, we still need to do coil current correction just to produce
a sinusoidal current in each phase. Thus, even if "i_correction"
is zero, we must still execute this routine. In the end, this
46
routine determines the new data values to be loaded into the ITU
buffer registers. The T3INT and T4INT routines are used to
actually load the buffer registers at the appropriate time.
NOTE: The sine table used in this routine uses values ranging
between 0 and 0x2d4. A value of 0x16a is used to represent sin(0)
and 0x2d4 for sin(90). A value of 0x000 is used for sin(240).
*/
signed long id;
signed long iq;
unsigned int an0_data;
unsigned int an1_data;
unsigned int an0_current;
unsigned int an1_current;
signed int sin240;
signed int sin90;
signed int sin330;
signed int voltage_u, voltage_v, voltage_w;
47
q axis values */
void ITU2_OVF(void)
48
{
/*
Name:
Version:
Date:
Author:
Inputs:
Outputs:
Function:
ITU2_OVF
1.0
7/27/97
Ken Schultz/Hitachi Ltd.
ITU2_flag
ITU2_flag
ITU2_UNDER(void)
{
/*
Name:
Version:
Date:
Author:
Inputs:
Outputs:
Function:
ITU2_UNDER
1.0
8/1/97
Ken Schultz/Hitachi Ltd.
ITU2_Flag
ITU2_Flag
49
void TM1(void)
{
/*
Name:
TM1
Version:
1.0
Date:
8/1/97
Author: Ken Schultz/Hitachi Ltd.
Inputs:
None
Outputs:
None
Function:
This is the interrupt handler scheduled when ITU1 has a compare
match with GRA1. GRA1 was set by the initialization routine
such that the TCNT value will have a match every 500 usec when
the SH-1 is operating at 20 MHz. TM1 calls the Speed_Calc routine
which determines the motor speed and position (angle of rotation).
After this, a PID calculation is done. Next, we call a routine
to adjust the current in each coil based upon the position
of the shaft. This adjustment is necessary just to keep the
sinusoidal current flow. The PID routine adds a correction factor
to the normal adjustment to correct for speed error. The net
result of all the subroutines called here is that the buffer
registers of ITU3 and ITU4 will be modified. The interrupt
handlers T3INT and T4INT will take care of servicing the ITU.
NOTE: If you are solving a postion control problem, such as
holding a robot arm in a precise location, rather than maintaining
a specific speed, this code can be adapted. In this case, you
would not be interested in speed error, but position error. In
fact, you may want a speed of zero. The Speed_Calc routine also
determines position as a part of it's calculation.
*/
ITU1.TCNT = 0x0000;
Speed_Calc;
PID_Calc;
Coil_Current_Calc;
50
void T3INT(void)
{
/*
Name:
Version:
Date:
Author:
Inputs:
Outputs:
Function:
T3INT
1.0
8/19/97
Ken Schultz/Hitachi Ltd.
data_u, data_v, data_w
U100_set, V100_set, W100_set
51
U100_set = 0x01;
temp_char = ITU4.TSR.BYTE;
ITU4.TSR.BYTE = 0x00;
ITU4.TIER.BYTE = 0x04;
ITU3.BRB = data_u;
}
else {
}
}
/* process the V phase */
if (data_v << T3_min) {
ITU4.BRA = 0x7fff;
}
else {
if (data_v >> T4_max) {
V100_set = 0x01;
temp_char = ITU4.TSR.BYTE;
ITU4.TSR.BYTE = 0x00;
ITU4.TIER.BYTE = 0x04;
}
else {
ITU4.BRA = data_v;
}
}
}
else {
ITU4.BRB = data_w;
}
}
/* disable the Timer 3 interrupts, coil current correct */
/* will reenable on the next iteration. */
ITU3.TIER.BYTE = 0x00;
/* disable T3 ints */
}
void T4INT(void)
{
/*
Name:
T4INT
52
Version:
Date:
Author:
Inputs:
Outputs:
Function:
1.0
8/1/97
Ken Schultz/Hitachi Ltd.
U100_set, V100_set, W100_set
if (V100_set == 0x01) {
ITU4.BRA = 0x7fff;
V100_set = 0x00;
}
if (W100_set == 0x01) {
ITU4.BRB = 0x7fff;
W100_set = 0x00;
}
53
LINK SUBCOMMANDS
INPUT DebSH\init.obj
INPUT DebSH\main.obj
INPUT DebSH\initsct.obj
INPUT DebSH\lowlvl.obj
INPUT DebSH\lowsrc.obj
INPUT DebSH\vect.obj
INPUT DebSH\sect.obj
OUTPUT DebSH\pid1.abs
EXIT
54
1
***
LIST
***
SECTION
LENGTH
NAME
START
END
UNIT NAME
MODULE NAME
ATTRIBUTE
CODE
NOSHR
VECT
H'00000202
H'00000000
H'00000201
vect
vect
* TOTAL ADDRESS *
H'00000202
ATTRIBUTE
DATA
H'00000000
H'00000201
H'0FFFF000
H'0FFFF07E
NOSHR
B
H'0000007F
main
main
H'0FFFF080
H'0FFFF283
H'00000204
lowsrc
lowsrc
H'0FFFF284
H'0FFFF284
H'00000000
sect
sect
H'0FFFF284
H'0FFFF413
H'00000190
_iob
_iob
H'0FFFF414
H'0FFFF417
H'00000004
_errno
_errno
* TOTAL ADDRESS *
H'00000418
ATTRIBUTE
CODE
H'0FFFF000
H'0FFFF417
NOSHR
55
P
H'0000003C
H'0FFFF418
H'0FFFF453
init
init
H'0FFFF454
H'0FFFFD77
H'00000924
main
main
H'0FFFFD78
H'0FFFFDE3
H'0000006C
initsct
initsct
H'0FFFFDE4
H'0FFFFE43
H'00000060
lowlvl
lowlvl
H'0FFFFE44
H'100000DB
H'00000298
lowsrc
lowsrc
H'100000DC
H'10000183
H'000000A8
__divlu
__divlu
H'10000184
H'100001C1
H'0000003E
__muli
__muli
H'100001C4
H'10000227
H'00000064
__s_scmp
__s_scmp
H'10000228
H'100002E5
H'000000BE
__sftl
__sftl
H'100002E8
H'100003FD
H'00000116
__sftra
__sftra
H'10000400
H'100004BD
H'000000BE
__sftrl
__sftrl
56
2
***
LIST
***
SECTION
LENGTH
NAME
START
END
UNIT NAME
MODULE NAME
ATTRIBUTE
CODE
NOSHR
P
H'0000004C
H'100004C0
H'1000050B
fclose
fclose
H'1000050C
H'10000573
H'00000068
freopen
freopen
H'10000574
H'100005E9
H'00000076
__q_scmp
__q_scmp
H'100005EC
H'100006A3
H'000000B8
_flclose
_flclose
H'100006A4
H'100007FF
H'0000015C
_flopen
_flopen
H'10000800
H'10000897
H'00000098
free
free
* TOTAL ADDRESS *
H'00001480
ATTRIBUTE
C
H'00000034
DATA
H'0FFFF418
H'10000897
H'10000898
H'100008CB
NOSHR
main
main
H'100008CC
H'100008EA
H'0000001F
lowsrc
lowsrc
57
H'100008EC
H'100008FF
H'00000014
sect
sect
H'10000900
H'10000916
H'00000017
_flopen
_flopen
* TOTAL ADDRESS *
H'0000007F
ATTRIBUTE
DATA
D
H'00000800
H'10000898
H'10000916
H'10000918
H'10001117
NOSHR
main
main
H'10001118
H'1000111B
H'00000004
lowlvl
lowlvl
H'1000111C
H'1000111F
H'00000004
lowsrc
lowsrc
H'10001120
H'10001120
H'00000000
sect
sect
H'10001120
H'10001123
H'00000004
_freeptr
_freeptr
* TOTAL ADDRESS *
H'0000080C
H'10000918
H'10001123
58
3
***
LIST
***
SECTION
LENGTH
NAME
START
END
UNIT NAME
MODULE NAME
ATTRIBUTE
STACK NOSHR
S
H'00000400
H'10001124
H'10001523
vect
vect
* TOTAL ADDRESS *
H'00000400
ATTRIBUTE
DATA
R
H'00000000
H'10001124
H'10001523
H'10001524
H'10001524
NOSHR
sect
sect
* TOTAL ADDRESS *
H'00000000
H'10001524
H'10001524
59
1
***
***
SYMBOL
ADDR
TYPE
H'000001D4
DAT
H'00000000
DAT
H'0FFFF7DC
ENT
H'100008BC
DAT
H'0FFFFAB0
ENT
H'0FFFFB02
ENT
H'0FFFF018
DAT
H'0FFFF46C
ENT
H'0FFFF038
DAT
H'100008A0
DAT
H'10000898
DAT
H'1000089C
DAT
H'0FFFF752
ENT
H'100008AC
DAT
H'1000042C
DAT
H'10000918
DAT
H'0FFFF6BA
ENT
H'100008A4
DAT
H'0FFFFB68
ENT
H'100008C4
DAT
H'100008C0
DAT
H'0FFFFCFC
ENT
NAME
BEGIN
START
_Coil_Current_Calc
_DeadTime
_ITU2_OVF
_ITU2_UNDER
_ITU2_flag
_Init
_K
_Kd
_Ki
_Kp
_PID_Calc
_Rl
_SFTRL1
_Sin
_Speed_Calc
_T
_T3INT
_T3_max
_T3_min
_T4INT
60
_T4_max
H'100008C8
DAT
H'0FFFFB40
ENT
H'0FFFF07C
DAT
H'0FFFF07D
DAT
H'0FFFF010
DAT
H'0FFFF014
DAT
H'0FFFF07E
DAT
H'100008F8
DAT
H'100008FC
DAT
H'0FFFFEDE
ENT
H'000001EA
DAT
H'100008F0
DAT
H'100008F4
DAT
H'100008EC
DAT
H'0FFFF418
ENT
H'0FFFFD78
ENT
H'0FFFFE44
ENT
H'1000111C
DAT
H'0FFFF080
DAT
H'100000DC
DAT
H'0FFFF414
DAT
H'100005EC
ENT
H'100006A4
ENT
H'10001120
DAT
H'0FFFF284
DAT
H'10000184
DAT
H'10000574
DAT
H'10000248
DAT
_TM1
_U100_set
_V100_set
_Vd
_Vq
_W100_set
__B_BGN
__B_END
__CLOSEALL
__DOSLEEP
__D_BGN
__D_END
__D_ROM
__INIT
__INITSCT
__INIT_IOLIB
___brk__
___heap__
__divlu
__errno
__flclose
__flopen
__freeptr
__iob
__muli
__quick_strcmp
__sftl
61
__sftra
H'10000308
DAT
62
2
***
***
SYMBOL
ADDR
TYPE
H'10000420
DAT
H'10001118
DAT
H'100001C4
DAT
H'0FFFFE10
ENT
H'0FFFFDE4
ENT
H'0FFFFFD6
ENT
H'100008B0
DAT
H'100008B8
DAT
H'100008B4
DAT
H'0FFFF034
DAT
H'0FFFF030
DAT
H'0FFFF070
DAT
H'0FFFF074
DAT
H'0FFFF078
DAT
H'0FFFF044
DAT
H'0FFFF050
DAT
H'0FFFF05C
DAT
H'100004C0
ENT
H'10000800
ENT
H'1000050C
ENT
H'0FFFF00C
DAT
H'0FFFF01C
DAT
NAME
__sftrl
__simio
__slow_strcmp
_charget
_charput
_close
_const240
_const330
_const90
_current_position
_current_speed
_data_u
_data_v
_data_w
_error
_error_id
_error_iq
_fclose
_free
_freopen
_i_correction
_last_ITU2
63
_lseek
H'0FFFFFE8
ENT
H'0FFFF454
ENT
H'0FFFFF54
ENT
H'10000578
DAT
H'0FFFFFFE
ENT
H'1000009A
ENT
H'0FFFF024
DAT
H'0FFFF028
DAT
H'0FFFF02C
DAT
H'0FFFF068
DAT
H'0FFFF06C
DAT
H'0FFFF020
DAT
H'0FFFF000
DAT
H'0FFFF004
DAT
H'0FFFF008
DAT
H'100008A8
DAT
H'10000046
ENT
_main
_open
_quick_strcmp1
_read
_sbrk
_sel_u
_sel_v
_sel_w
_sygd
_sygq
_target_speed
_temp_char
_temp_int
_temp_long
_windings
_write
64