I’ve been tearing my hair out for days trying to find the source of a current splat when my offline switching regulator is enabled. The circuit is a Non-isolated offline 8-12W LED driver based on the HV9931
https://www.microchip.com/wwwproducts/en/HV9931.The current splat occurs when the HV9931 is initially enabled by setting the PWMD input high. The attached scopeshots are Mains input voltage on Channel 1 and Mains input current measured across a 10R resistor on channel 2. The current splat only occurs when the bulk capacitor is mostly discharged.
I’d be grateful for any insight as to what might be the cause of this issue.