PWM0 may be interfering with UART

Hello,

nRF52840

NCS v2.5.0

We are using the nRF52840 for our application. The application uses PWM for it's buzzer, a PWM for it's LEDs, and also uses two uarts, a spi, and an I2C. We've run into an issue where when UART0 is being used there are odd spikes in the data lines. For example, the UART data will look fine but each time the line goes low we can see >10 small spikes on the line. It looks a lot like cross talk but we can't find anything and we've had it working fine at other times. In addition, the spikes have an extremely regular and precise period. Finally, occasionally the UART works great, and in this case I the buzzer starts clicking and doesn't work right anymore. This leads me to believe that there is some interaction between PWM0 and UART0? I'm not sure and we have spent a while on this one. 

I can send oscilloscope captures if needed.

Thanks so much for your reply,

Nathan

Parents
  • A circuit of the buzzer drive would be helpful; is the buzzer based on a piezo or coil? If the latter, notoriously noisy, is there a back emf clamp (diode, zener, etc)? Is the PWM drive single ended, half-bridge or full-bridge? "Precise period" sounds like PWM-driven interference, but it could also be one of the other peripherals. Adjacent pins and traces can show some crosstalk, but there is no known issue between PWM0 and UART0 I don't think. If the PWM pin or trace is close to the Uart pin or trace, try cutting one and hardwire the signal via a different route and pin and see if the interference changes. If the Uart Tx output is S0S1 drive, try changing to H0H1 drive on Tx and see if that affects the magnitude of the spikes. An oscilloscope trace showing the PWM vs Uart would be very helpful to determine any correlation.

Reply
  • A circuit of the buzzer drive would be helpful; is the buzzer based on a piezo or coil? If the latter, notoriously noisy, is there a back emf clamp (diode, zener, etc)? Is the PWM drive single ended, half-bridge or full-bridge? "Precise period" sounds like PWM-driven interference, but it could also be one of the other peripherals. Adjacent pins and traces can show some crosstalk, but there is no known issue between PWM0 and UART0 I don't think. If the PWM pin or trace is close to the Uart pin or trace, try cutting one and hardwire the signal via a different route and pin and see if the interference changes. If the Uart Tx output is S0S1 drive, try changing to H0H1 drive on Tx and see if that affects the magnitude of the spikes. An oscilloscope trace showing the PWM vs Uart would be very helpful to determine any correlation.

Children
No Data
Related