Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf51822QFAC & PWM

hello:

i use timer1 to get a pwm waveform,when i use RTT to test it,the waveform is ok,but when i take out the RTT,and Remove the battery and put on the battery again to reset the device,and then i find that the waveform is wrong。

my code is make the 7 waveform recurring,the first waveform run 5 seconds,and then the second waveform run 5 seconds,and then the third waveform run 5 seconds,and then the fourth waveform run 5seconds, and then the fifth waveform run 5 seconds,and then the sixth waveform run 5 seconds , and then the seventh waveform run 5 seconds,,,,and cycle。

TEST:

1、when i use swdio,clk,and open the RTT  window,and then use Logic analyzer to get the waveform,every one second i refresh it,the waveform is what i want,its ok。

2、when i take out the RTT,and Remove the battery and put on the battery again to reset the device,and then i find that the waveform is wrong。for example,i need one waveform for 5 seconds(Assuming that A third of the high level, two-thirds of the low level),The results may be that  correct  waveform for 3 seconds,and then error waveform for 1 second,and then correct  waveform for 1 second。(About the error waveform: A third of the low level, two-thirds of the high level。that means the Duty Level flip)

Parents Reply Children
No Data
Related