Not applicable
Aug 07, 2013
03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2013
03:12 AM
Before starting the PWMSP002 App with API call 'PWMSP002_Start', the direct and inverted output pins sit in the 'Passive Level state (in my case low).
When I stop the PWMSP002 App with API call 'PWMSP002_Stop' the direct and inverted output pins remain in their last known state which I believe is dependent on the timer value and compare register. In my case the outputs remain high which is not desirable.
Is there a method for stopping the PWM and ensuring the outputs return to their 'Passive level' states ?
I am considering making and breaking the signal connections in code instead of fixing them using the App configuration tab so I can reset the output pins directly from code once I have stopped the Apps but I would rather use API calls if possible.
Any help would be greatly appreciated.
Best regards
Aaron
When I stop the PWMSP002 App with API call 'PWMSP002_Stop' the direct and inverted output pins remain in their last known state which I believe is dependent on the timer value and compare register. In my case the outputs remain high which is not desirable.
Is there a method for stopping the PWM and ensuring the outputs return to their 'Passive level' states ?
I am considering making and breaking the signal connections in code instead of fixing them using the App configuration tab so I can reset the output pins directly from code once I have stopped the Apps but I would rather use API calls if possible.
Any help would be greatly appreciated.
Best regards
Aaron
- Tags:
- IFX
9 Replies
Not applicable
Aug 07, 2013
07:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 07, 2013
07:52 AM
I have found that the 'PWMSP002_Stop()' function resets the PWM timer to zero. This has the effect of leaving the output pin in the Non passive level if the passive state is configured to occur 'After Compare match' (assuming the compare register is greater than zero which is the case for anything but 0% DutyCycle).
My feeling is the 'PWMSP002_Stop()' function should not reset the PWM timer to zero as this can be done with the 'PWMSP002_SetTimerVal() function before starting the timer with the 'PWMSP002_Start()' function.
If anyone knows of a workaround I would really appreciate it.
Best regards
Aaron
My feeling is the 'PWMSP002_Stop()' function should not reset the PWM timer to zero as this can be done with the 'PWMSP002_SetTimerVal() function before starting the timer with the 'PWMSP002_Start()' function.
If anyone knows of a workaround I would really appreciate it.
Best regards
Aaron
Not applicable
Aug 08, 2013
01:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
01:21 AM
Hi Aaron, I'm concerned with this kind of problem too. I use CCUST01_Start() and CCUST01_Stop() to start and stop synchronously 4 pwm, but some outputs stay in the active level after being stopped, and that's not nice!...I started last week with Infineon XMC4500, so I'm completely new to this kind of processor...I'm waiting for some suggestion, since my FAE is on holiday!...
I agree with you, the stop function resets the timer to zero, so we do not have control on the outputs levels, but a way must exist to force the outputs low. With Texas DSPs I stop the pwm by putting them in high impedence state, like a sw-forced trap feature, is there something similar with XMC4000?
I hope some suggestions come soon 🙂
samuele
I agree with you, the stop function resets the timer to zero, so we do not have control on the outputs levels, but a way must exist to force the outputs low. With Texas DSPs I stop the pwm by putting them in high impedence state, like a sw-forced trap feature, is there something similar with XMC4000?
I hope some suggestions come soon 🙂
samuele
Not applicable
Aug 08, 2013
01:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
01:49 AM
Hi Samuele,
After 2 days of trying all possible combinations of API function calls I believe I have found a workaround using the GPIO_144.h macros to configure and control I/O pins. You will find GPIO_144.h in some DAVE examples.
I have partially tested this workaround and it is looking good so far. Here is my code...
Stopping PWM
Starting PWM
I hope this helps
Best regards
Aaron
After 2 days of trying all possible combinations of API function calls I believe I have found a workaround using the GPIO_144.h macros to configure and control I/O pins. You will find GPIO_144.h in some DAVE examples.
- My PWMSP002 'direct output' signal is configured to be connected to pin P0.6 from the 'Signal Connection' dialog.
- At the point I want the output pin to be left in a particular state, I re-configure the I/O pin to be a general purpose output pin and set it's output state using a GPIO_144.h macro call.
- Then I stop the PWMSP002 app
- Immediately after re-starting the PWMSP002 app I re-configure the pin to be connected to the PWMSP002 direct output signal again
I have partially tested this workaround and it is looking good so far. Here is my code...
Stopping PWM
// Set output pin low and disconnect from PWMSP002 app.
// This is essential as stopping PWM apps leaves pins in undefined state, typically high
P0_6_reset();
// Disconnect output pin from PWMSP002 app
P0_6_set_mode(OUTPUT_PP_GP);
// Stop PWM
PWMSP002_Stop(&PWMSP002_Handle3);
Starting PWM
// Start PWM
PWMSP002_Start(&PWMSP002_Handle3);
// Connect output pin to PWMSP002 app
P0_6_set_mode(OUTPUT_PP_AF3); // Alternative function 3 (ALT3) configuration
I hope this helps
Best regards
Aaron
Not applicable
Aug 08, 2013
02:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
02:38 AM
Hi Samuele,
I have carried out further tests. The workaround works well. I would however like to see a solution within the APP's.
Best regards
Aaron
I have carried out further tests. The workaround works well. I would however like to see a solution within the APP's.
Best regards
Aaron
Not applicable
Aug 08, 2013
03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
03:00 AM
thanks Aaron,
I've never considered doing like this, but I think I'll try as you suggest. Anyway, I cannot find GPIO_144.h in the projects, can you tell me where it is located?
thank U
samuele
I've never considered doing like this, but I think I'll try as you suggest. Anyway, I cannot find GPIO_144.h in the projects, can you tell me where it is located?
thank U
samuele
Attachments are accessible only for community members.
Not applicable
Aug 08, 2013
03:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
03:13 AM
Not applicable
Aug 08, 2013
03:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
03:33 AM
thanks again Aaron, this afternoon I'm going to try...
Should I find other solutions I'll share them in the forum 🙂
samuele
Should I find other solutions I'll share them in the forum 🙂
samuele
Not applicable
Aug 08, 2013
05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2013
05:23 AM
it works good 🙂
thank you!
samuele
thank you!
samuele
May 03, 2020
04:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 03, 2020
04:40 PM
I am new to XMC and DAVE. I came across to this problem when working on some examples.
I would like to know if there is a solution to this problem within the app now. Or, is the method offered here still the only solution after 7 years?
Thank you.
I would like to know if there is a solution to this problem within the app now. Or, is the method offered here still the only solution after 7 years?
Thank you.