This design leverages F28P65 dual core with
lockstep plus CLA and EtherCAT with NMR (9 × 9 mm) package as the motor control and
communication controller. The motor control interface includes:
- Enhanced Pulse Width Modulator (ePWM) – The PWM
peripheral is built up from smaller single channel submodules with separate
resources that can operate together as required to form a system. This design
employs ePWM 1 to 18 for the 6 axis’s three phase motor driver. Each ePWM
submodule has two channels A and B to generate two complementary PWM signals
with configurable dead-band. For three-phase motor control, total 6 × PWMs are
implemented per axis. All these PWM submodules share the same time base clock of
200MHz with up and down count mode and synchronize with each other. Each ePWM
module has a synchronization input and an output which can be configured to link
to serval sources and events such as EtherCAT sync0 pulse and FSI RXTRIG to
close the loop between communication and PWM. In this reference design, EPWM1 of
axis 1 is triggered by EtherCAT sync0 pulse and all the other EPWMx modules’
sync IN are triggered by EPWM1’s Sync OUT.
- Analog-to-digital converter (ADC)
– The ADC peripheral is a successive approximation (SAR) style ADC with
selectable resolution of 12 bits or 16 bits. Each ADC module consists of a
single sample-and-hold (S/H) circuit allowing simultaneous sampling for 3-phase
current of a motor. The ADC reference voltage is provided by an external
high-precision voltage reference chip REF6230. The corresponding ADC channels
start sampling time for each axis are triggered by its own
ADC-start-of-conversion (SOCA) and this SOCA event is triggered by the compare
event C of each axis EPWM module respectively. The interrupt which is used for
the FOC calculation is generated automatically once data conversion is done by
ADC SOC.
- EtherCAT SubordinateDevice
Controller (ESC) – The ESC on this F28P65 MCU provides up to 2 Media Independent
Interface (MII) ports to connect to EtherCAT PHYs. The process data interface is
through 16-bit asynchronous interface. The ESC also provides a 64-bit
distributed clocking which can be used internally or externally. Including
utilizing SYNC0/1 and LATCH0/1 output signal to synchronize GPIOs, allow inputs
from any GPIOs as well as other muxing options for internal device events and
supporting timestamping. The ESC has 8 field bus memory management units (FMMUs)
which can support all native types of RD/, WR/, RDWR, and built-in features of
bit- and byte-addressing. An I2C EEPROM interface is provided to
store the information like MAC address. ESC access allocation is to the CPU1
subsystem during initialization.
- Dual core motor control design –
This reference design leverages dual C28x DSP core to perform 6 axis motor
control and industrial communication with CPU1 is handling axis 1 and axis 2
control plus EtherCAT application and CPU2 is handling axis 3 to 6 motor
control. The memories and peripherals need to be assigned allocation for both
CPUs as follows:
- Flash bank 0 to bank 3 (0x80000 -
0xFFFFF) owned by CPU1 and bank 4 (0x100000 – 0x11FFFF) owned by CPU2
- DRAM1-4 from 0x00C000 to 0x020000
for data purpose, GSRAM0-2 from 0x008000 to 0x022000 for code purpose are
assigned to CPU1. DRAM5 from 0x020000 with 8KB length, GSRAM3-4 from 0x016000
with 16KB length are assigned to CPU2.
- EPWM1-6 are controlled by CPU1
and EPWM7-18 are controlled by CPU2
- ADCA and C are controlled by
CPU1, ADCB is controlled by CPU2
- SPIA and D are controlled by CPU1
for axis 1-2 encoder interface and DRV configuration, SPIB and C are controlled
by CPU2 for axis 3-6 encoder interface
- EtherCAT controlled by CPU1
- CLB1 is controlled by CPU1 for
triggering SPIA data transmission, CLB2 and CLB5 are controlled by CPU2 for
triggering SPIB and C data transmission.
Figure 3-1 shows the motor
control and communication interface of TIDA-010992, and Figure 3-2 shows the axis 1 motor control peripherals example.