Hardware Configuration for Single Shunt FOC
This section explains how to configure hardware driver blocks to implement Field Oriented Control (FOC) using DC shunt current.
Hardware Requirements
The essential hardware requirements to implement single-shunt Field Oriented Control (FOC) include:
The hardware must support configurability of ADC sampling events to be precisely synchronized with either the rising or falling edge of the PWM signals.
The hardware must provide configurable PWM generation capabilities, enabling dynamic adjustment of phase shifts as required during the operation.
PWM Block Configuration for F28069 control Card
To achieve a dynamic phase shift in the PWM pulses, two compare registers can be used for each of the three phases, as shown in the below figure.

With the above configuration, phase shifting of the PWM pulse can be accomplished by appropriately selecting the values of the compare registers (CMPA and CMPB), as shown in the below figure.

The deadband polarity must be set to Active low complementary
ALC). Additionally, the deadband duration must be defined using a
script variable (for example, target.DeadtimeClockCycle), which will
be used to calculate the PWM shift value.

The event trigger must be configured with the ADC to measure current at either the rising or falling edge of the PWM pulse. The below image shows the configuration for current measurement at the rising edge.

ADC Block Configuration for F28069 Control Card
The ADC block must be configured to synchronize with the PWM, as shown in the below
image. Additionally, the SoCx acquisition window must be defined using a script variable
(for example, target.ADCClockCycle), which will be used to calculate
the PWM shift value.
