- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to start two PWM modules simultaneously?
I came across the function TCPWM_TriggerCommand(mask, command). But I don't know how to feed in the parameters.
I have two PWM modules PWM1 and PWM2, please give an example to show the use of TCPWM_TriggerCommand() function.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see the command in the PWM_n.c file, but it is not descriptive enough to show how
to set up.
All else fails file a CASE and post back here results for benefit of forum.
To create a technical or issue case at Cypress -
www.cypress.com
“Support”
“Technical Support”
“Create a Case”
You have to be registered on Cypress web site first.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I just learnt how to start several PWM modules simultaneously using the TCPWM_TriggerCommand() function. It's very easy!
1. Place several PWM components in the design and enable the external 'START' terminal in the initial setting box.
2. Start all PWMs one by one using PWM_Start(). Note: this will only initialize the PWM blocks and will not start them because the external 'Start' terminal is present.
3. Now use the TCPWM_TriggerCommand() function to start all of them simultaneously.
Here is an example code with two PWM blocks.
PWM_1_Start();
PWM_2_Start();
PWM_1_TriggerCommand(PWM_1_MASK|PWM_2_MASK, PWM_1_CMD_START);
Any instance of PWM can apply this command on any of the PWMs in the design. For example
instead of: PWM_1_TriggerCommand(PWM_1_MASK | PWM_2_MASK, PWM_1_CMD_START);
we could use: PWM_2_TriggerCommand(PWM_1_MASK | PWM_2_MASK, PWM_1_CMD_START);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, thats very nice. I need to remember this. Thanks!