Not applicable
Dec 17, 2013
02:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 17, 2013
02:12 AM
Hello,
I'am working on a PWM signal on my Relax Lite Kit (without DAVE Apps, because I must not use them) and I'm struggling with switching it off properly.
When putting the slice in idle mode the output pin is randomly set to HIGH or LOW, where I need it to be LOW only.
I looked into the Dave Apps API Docu, theres a function called "PWMSP001_Stop" which, as far I can see, just sets the slice in idle mode and
clears timervalues and prescalers. I also can't find a note in the reference manual where pinstates are described in idle mode.
So what's the best way to disable the PWM and get the corresponding GPIO on a defined level without changing the GPIO alternate function etc.?
For now I am setting the compare value to zero, but I'd like to switch it off properly rather than just setting the duty cycle to zero.
Thanks,
Raz
I'am working on a PWM signal on my Relax Lite Kit (without DAVE Apps, because I must not use them) and I'm struggling with switching it off properly.
When putting the slice in idle mode the output pin is randomly set to HIGH or LOW, where I need it to be LOW only.
I looked into the Dave Apps API Docu, theres a function called "PWMSP001_Stop" which, as far I can see, just sets the slice in idle mode and
clears timervalues and prescalers. I also can't find a note in the reference manual where pinstates are described in idle mode.
So what's the best way to disable the PWM and get the corresponding GPIO on a defined level without changing the GPIO alternate function etc.?
For now I am setting the compare value to zero, but I'd like to switch it off properly rather than just setting the duty cycle to zero.
Thanks,
Raz
- Tags:
- IFX
2 Replies
Not applicable
Dec 18, 2013
06:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 18, 2013
06:51 PM
Hi razdraz
In my opinion, i choose to change the GPIO alternate function to direct output and set the output to LOW as soon as i want to disable the PWM output.
In my opinion, i choose to change the GPIO alternate function to direct output and set the output to LOW as soon as i want to disable the PWM output.
Dec 26, 2013
10:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 26, 2013
10:38 PM
razdraz wrote:
Hello,
I'am working on a PWM signal on my Relax Lite Kit (without DAVE Apps, because I must not use them) and I'm struggling with switching it off properly.
When putting the slice in idle mode the output pin is randomly set to HIGH or LOW, where I need it to be LOW only.
I looked into the Dave Apps API Docu, theres a function called "PWMSP001_Stop" which, as far I can see, just sets the slice in idle mode and
clears timervalues and prescalers. I also can't find a note in the reference manual where pinstates are described in idle mode.
So what's the best way to disable the PWM and get the corresponding GPIO on a defined level without changing the GPIO alternate function etc.?
For now I am setting the compare value to zero, but I'd like to switch it off properly rather than just setting the duty cycle to zero.
Thanks,
Raz
Hi razdraz,
Please have a look into chapter "22.2.7.8 TRAP Function" which allows the PWM outputs to react on the state of an input pin. Hope this meet your needs and we can discuss further on this topic.
Best Regards
Travis