You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/30 09:08:07 UTC
[GitHub] [incubator-nuttx] diegoherranz opened a new issue #2446: STM32 PWM randomly changes polarity
diegoherranz opened a new issue #2446:
URL: https://github.com/apache/incubator-nuttx/issues/2446
Following the video tutorials by @acassis (thanks for those by the way!), I've noticed that the PWM output polarity changes randomly.
Build the stm32f103-minimum:pwm config:
```
$ make distclean
$ tools/configure.sh stm32f103-minimum:pwm
$ make
$ (flash with openocd)
```
Call the pwm example app a few times until the PWM polarity changes. It seems random but normally not more than 10 attempts needed to make it fail.
Inside NSH:
```
nsh> pwm -d 10
nsh> pwm -d 10 (run multiple times...)
```
After the polarity has been reversed, it can come back to non-inverted if you keep running the same command.
Enabling debug information, I've seen that the polarity bit in the CCER register does actually change.
Good:
`0pwm_dumpregs: CCER: 0100 CNT: d9544 PSC: u000a ARR: tffad`
Bad:
`0pwm_dumpregs: CCER: 0300 CNT: d9545 PSC: u000a ARR: tffad`
It seems that something is toggling that bit, but I haven't seen what. Any idea? Am I doing something wrong?
Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 closed issue #2446: STM32 PWM randomly changes polarity
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed issue #2446:
URL: https://github.com/apache/incubator-nuttx/issues/2446
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] diegoherranz commented on issue #2446: STM32 PWM randomly changes polarity
Posted by GitBox <gi...@apache.org>.
diegoherranz commented on issue #2446:
URL: https://github.com/apache/incubator-nuttx/issues/2446#issuecomment-736032629
See https://github.com/apache/incubator-nuttx/pull/2448#issuecomment-736032200
Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] raiden00pl commented on issue #2446: STM32 PWM randomly changes polarity
Posted by GitBox <gi...@apache.org>.
raiden00pl commented on issue #2446:
URL: https://github.com/apache/incubator-nuttx/issues/2446#issuecomment-735844105
Could you try https://github.com/apache/incubator-nuttx/pull/2448 ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org