Dealing with coupling of PWM noise into Hall-Sensors as spikes in BLDC driver circuit
Here is basically what I have (I also have a ferrite bead in series right at the connector, but that is for EMI, not part of the low-pass filter):







simulate this circuit &ndash; Schematic created using CircuitLab

Here is what I would suggest for you, since you also want to reduce the voltage from 5V to 3.3V. The RC time constant (ignoring the 1k) is the product of R2 and R3 in parallel and 56pF. R2 and R3 in parallel is 10k, so, it is pretty close to the same time constant as my circuit. You can experiment with different values of capacitor to change the time constant, but I suspect you will see a large benefit from this. The rise time is around 500 or 600 ns, which should be OK.







simulate this circuit

Put the cap close to the processor. Resistor can be close, also, but that is less critical than making sure the capacitor GND connection is close to processor GND connection.