Hi.
I have an RC circuit 1kOhm and 22uF that generates a sine wave from a PWM signal generated by a battery powered STM32F103C8T6 (Blue Pill). I take all measurements with a handheld oscilloscope (battery powered). The PWM frequency is 10kHz.
I noticed that the connection order affects my measurements when I connect the capacitor first and then the resistor, in this case there is some additional noise. But what's the cause of this noise? I know that in the case when the black wire of a probe is connected to the GND pin of the microcontroller, there's no noise, but the current path looks to me the same in both cases.
I'd appreciate it if you could explain this to me.
Below are the two cases, the first is RC order, then CR:


I have an RC circuit 1kOhm and 22uF that generates a sine wave from a PWM signal generated by a battery powered STM32F103C8T6 (Blue Pill). I take all measurements with a handheld oscilloscope (battery powered). The PWM frequency is 10kHz.
I noticed that the connection order affects my measurements when I connect the capacitor first and then the resistor, in this case there is some additional noise. But what's the cause of this noise? I know that in the case when the black wire of a probe is connected to the GND pin of the microcontroller, there's no noise, but the current path looks to me the same in both cases.
I'd appreciate it if you could explain this to me.
Below are the two cases, the first is RC order, then CR:








