PWM affected by wxPython

Hi all,
now I have a real problem.
On RPi I use my application with 8 intruments on Panel (and on Frame)

I want to use PWM output provided by:

import RPi.GPIO as GPIO

then using this code:

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12,GPIO.OUT)
pi_pwm=GPIO.PWM(12,1000) # Hz
pi_pwm.start(50) #duty 50%

does not make a nice/clean 1kHz tone on pin 12, but some “noise”
when I do not run wxApp the sound is clean !?

Does anybody know what is going on? Why PWM is affected by wx?

Hi,
Do you have a basic demo code reproducing the problem ?
Nicolas

The problem is that even RPi4 is not powerful enough not to be affected by running wxPython GUI

Finally I managed to use real hw pwm output

Just for interest:I have loop 0.5sec for gui update, rpi4 can do it but rpi1 /one/ needs about 4 seconds, RAM is not limiting factor