Download Print this page

Espressif ESP32 Technical Reference Manual page 428

Hide thumbs Also See for ESP32:

Advertisement

16 Motor Control PWM (PWM)
16.3.2.3 PWM Timer Shadow Register
The PWM timer's period register and the PWM timer's clock prescaler register have shadow registers. The
purpose of a shadow register is to save a copy of the value to be written into the active register at a specific
moment synchronized with the hardware. Both register types are defined as follows:
• Active Register
This register is directly responsible for controlling all actions performed by hardware.
• Shadow Register
It acts as a temporary buffer for a value to be written on the active register. Before this happens, the con-
tent of the shadow register has no direct effect on the controlled hardware. At a specific, user-configured
point in time, the value saved in the shadow register is copied to the active register. This helps to prevent
spurious operation of the hardware, which may happen when a register is asynchronously modified by
software. Both the shadow register and the active register have the same memory address. The software
always writes into, or reads from the shadow register. The moment of updating the active register is de-
termined by its specific update method register. The update can start when the PWM timer is equal to
zero, when the PWM timer is equal to period,at a synchronization moment, or immediately. Software can
trigger a globally forced update which will prompt all registers in the module to be updated according to
shadow registers.
16.3.2.4 PWM Timer Synchronization and Phase Locking
The PWM modules adopt a flexible synchronization method. Each PWM timer has a synchronization input and
a synchronization output. The synchronization input can be selected from three synchronization outputs and
three synchronization signals from the GPIO matrix. The synchronization output can be generated from the
synchronization input signal, or when the PWM timer's value is equal to period or zero. Thus, the PWM timers
can be chained together with their phase locked. During synchronization, the PWM timer clock prescaler will
reset its counter in order to synchronize the PWM timer clock.
16.3.3 PWM Operator Submodule
The PWM Operator submodule has the following functions:
• Generates a PWM signal pair, based on timing references obtained from the corresponding PWM timer.
• Each signal out of the PWM signal pair includes a specific pattern of dead time.
• Superimposes a carrier on the PWM signal, if configured to do so.
• Handles response under fault conditions.
Figure
16-14
shows the block diagram of a PWM operator.
Espressif Systems
428
Submit Documentation Feedback
ESP32 TRM (Version 5.2)

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?