This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TM4C123GH6PGE
for a project multiple channels are used to output PWM signal in parallel. The various PWM signals are very critical for the function.
The multiple channels should be time synchronized to start at simultaneously and preferrably not phase shifted (interleaved).
The synchronize function is known.
However currently a separate Assembler thread is used to modify the PWM to start simultaneously. This is not preferred since any possible skip/delay will damage the application.
Please support me in this.
The key question here would be how many PWM's need to be started synchronized.
From what I am seeing, the PWMGenEnable can be used to start a PWM pair that belongs to a specific generator block - so two PWM's channels - at the same time. To do more than that, I am not seeing a way to instantly synchronize on startup. That requirement might be too specific for a general purpose MCU. The provided synchronize options for the PWM peripheral work well and this issue of sync on start-up is not one I recall seeing being raised before even when dealing with PWM synchronization applications.
Just to theorize for if they need more than two channels... maybe they could use a tri-state to hold the signal back until all generators are setup? Provided that the tri-state doesn't introduce some asynchronous behaviors itself.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Ralph Jacobi:
Our small group - thru past experience - may prove useful in such, "Multi-Channel, Synchronized PWM Operation."
We will document our belief via the:
Driver Library exposes 2 key functions: (both API Functions appear to "Directly Meet this poster's needs)
220.127.116.11 PWMGenConﬁgureDescription: This function is used to set the mode of operation for a PWM generator. The counting mode, synchronization mode, and debug behavior are all conﬁgured
When the PWM generator parameters (period and pulse width) are modiﬁed, their effect on the output PWM signals can be delayed. In synchronous mode, the parameter updates are not applied until a synchronization event occurs. This mode allows multiple parameters to be modiﬁed and take effect simultaneously, instead of one at a time. Additionally, parameters to multiple PWM generators in synchronous mode can be updated simultaneously, allowing them to be treated as if they were a uniﬁed generator.
18.104.22.168 PWMSyncTimeBaseSynchronizes the counters in one or multiple PWM generator blocks.
Now our poster noted, "The synchronize function is known." Yet it appears that (even) w/that knowledge - poster sought (further) clarity & understanding. It is believed this posting answers that need...
And our past code: (believed "Good for Gov't Work")
// Configures two PWM generators for up/down counting mode, synchronous updates, and to stop at zero on debug events. (again - all 4 'Gens' may //be accommodated)
ROM_PWMGenConfigure(PWM0_BASE, PWM_GEN_0, (PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_GEN_SYNC_LOCAL | PWM_GEN_MODE_DB_SYNC_LOCAL | PWM_GEN_MODE_FAULT_EXT | PWM_GEN_MODE_FAULT_MINPER | PWM_GEN_MODE_DBG_STOP));
ROM_PWMGenConfigure(PWM0_BASE, PWM_GEN_2, (PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_GEN_SYNC_LOCAL | PWM_GEN_MODE_DB_SYNC_LOCAL | PWM_GEN_MODE_FAULT_EXT | PWM_GEN_MODE_FAULT_MINPER | PWM_GEN_MODE_DBG_STOP));
// Synchronize the time base of the generators.// ROM_PWMSyncTimeBase(PWM0_BASE, PWM_GEN_0_BIT | PWM_GEN_2_BIT | PWM_GEN_3_BIT); // these parameters are FAR from intuitive. //We've 'renamed them' (not shown) & in that process FAR BETTER related the parameter to the specific PWM Generator Function...
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.