This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52: "spike" after last period with inverted polarity PWM

Hi,

I use the a gpiote_in_event to trigger a number of PWM pulses which works fine so far. However, the exact behaviour of the generated signal is important so that the device interfaced to the signal line does also behave correctly.

I saw that if I use inverted polarity (what is what I want to do), i get a very short pulse at the end of the PWM (after the number of specified periods). It seems that after the number of specified repetitions, the HW is just about starting another PWM sequence which is then immediately aborted.

This spike is a problem in my system, how can i get rid of it?

/EDIT: see screenshot

Parents
  • I still think this might be a bug, but in my case I was able to work around this by sticking a full "0" at the end (1<<15 in this case to set the inverted flag on a 0 output), and increasing my buffer size by 1.

    Before I was seeing this weird tiny spike at the end, and after it was gone.

    Obviously this won't work in all cases, but should work in most.

Reply
  • I still think this might be a bug, but in my case I was able to work around this by sticking a full "0" at the end (1<<15 in this case to set the inverted flag on a 0 output), and increasing my buffer size by 1.

    Before I was seeing this weird tiny spike at the end, and after it was gone.

    Obviously this won't work in all cases, but should work in most.

Children
No Data
Related