STM32L EMC radiated immunity lockup issues on SPI / I2C and DC input lines - Page 1
Forum section: electronics / general

author: miller863
author_rank: Newbie
timestamp: November 18, 2021, 04:11:24 pm
content: Hi, I have done two rounds of EMC testing on a product with STM32L476 microprocessor, and am still struggling with my processor locking up during Radiated immunity between 100 and 250MHz. It does not recover. 10V/m.Product Architecture: 3 PCBAs. Main board (micro, display, etc), daughter (option) board that houses power supply and DAC, and sensor board with ADC and EEPROM (SPI and I2C):Input/Output to product: An M12 connection with 1.25" flex circuit feeds 12-36VDC to the Main board, which feeds through to the daughter board. The daughter board feeds the main board with regulated power, and has a DAC that outputs back to the M12. We chose this "feed through" architecture over a wiring harness. The main board also has a power supply. Both the daughter board and a battery pack with 4 AA batteries feed the main board power supply. The battery pack is installed whether the option board is installed or not.Internally, I2C and SPI is routed from the main board to the sensor board along with 3.3V via a 6” unshielded wire harness. I have 1k @100MHz ferrite chips in series with 33Ohm resistors on all the data lines on the main board (but not on the sensor board). I have standard filtering on the DC power supply on the option board (TVS, then 600 Ohm ferrite bead feeding reverse protection diode, then 10uF and 100nF capacitors)EMC testing details:Round 1 EMC Testing: Failed conducted immunity and radiated.Countermeasures after round 1 (see image): tacked on 10nF X2Y capacitors across the 12-36V input and analog output, as well as 100nF feed through capacitors (see attached image). I also added a 2uF capacitor and a 470pF capactor across the DC input. I added 470pF caps in parallel with the groups of micro bypass caps.Round 2 EMC testing (tested with above countermeasures):Passed conducted immunity, but still failed radiated immunity in the 100-250MHz rangeIf I wrapped the unit in tinfoil, and wrapped the end of the M12 cable with tinfoil, and grounded to chamber ground, the unit passed. Putting clip-on ferrites on the sensor board wire harness and battery board wires seemed to reduce the EMC impact. Not a practical solution as they are weighty and I would have to figure out how to secure them in the unit.Countermeasure for round 3 (here’s where I need some help with ideas):Bought better M12 cables with shield all the way to the screw/lock nut (previously had “field wire able cable” with screw terminals, shield ended 1” short of connector)Filter the I2C and SPI lines without a giant ferrite (need help on this). X2Y caps, or just standard caps? Common mode chokes.??FYI, I did try putting clip-on ferrites on the wire harness which reduced the EMC impact, but I had to use other techniques like covering the cable end with tinfoil for it to pass altogether, so I suspect a combination of noise getting in on the main power input line as well as picked up by the harness, and by the PCB itself.Thanks in advance for your help!

author: AndyC_772
author_rank: Super Contributor
timestamp: November 18, 2021, 04:29:43 pm
content: HiThis type of issue is critically dependent on the physical layout of your system including its cables.To diagnose it with any degree of confidence, we'd need to see photos of the test setup, clear images of the layout (especially around the CPU and any I/O connectors), and a schematic.

author: harerod
author_rank: Frequent Contributor
timestamp: November 18, 2021, 05:56:23 pm
content: What AndyC_772 said. I have several designs in the field where STM32F0/F1/F4 have passed industrial or medical EMC. Standard requirements can be fulfilled by a four layer PCB in a plastic enclosure.Class A behavior (no reaction to disturbance) can be done.Independent of how tough your physical design is, it should always be supported by hardened watchdog and firmware concept.I'd suggest you pay a professional to look over your designs. After several rounds of playing with the physics, your next design will pass no sweat.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 18, 2021, 08:19:07 pm
content: No ESD diodes?A likely culprit is RF rectifying by ESD clamp diodes, the charge injection causing latchup, or some kind of malfunction anyway. ("Charge injection" meaning, conduction of said diodes, causing other indiscriminate current flows in the die, in the area around the diode (some ~µm). This can increase supply current, muck up levels of nearby gates, corrupt nearby analog bits including ADC/DAC, PLL (e.g. USB, core clock), etc. 0mA charge injection is recommended on analog pins for example.)If you don't have a metallic enclosure to ground shields to, and filter everything against, then the next best thing is using the PCB ground plane to the same end. Terminate shields, connectors and filters near the edge, so that the middle can be relatively shielded from outside influences.Until very high frequencies (GHz), and except for stray resonances (which shouldn't be applicable with most signals and routing), the board is fairly monolithic with respect to outside fields, and problems mostly have to do with wired connections. Conducted emission ends at 30MHz and susceptibility at 80, but it's mostly a practical matter and the same effects continue up into the 100s MHz. For example, your sensor board likely has a resonance in the frequency band of interest, acting as two masses (the boards) joined by a spring (wire harness). Which being unshielded, means about half the radiation goes into signal lines and the other half into ground. Which is why I2C is a terrible idea to go off-board, it has basically no noise immunity, and isn't much better even with filtering.Shielded cables do nothing unless the shield is grounded. Any voltage induced on the shield, is also induced on the signal lines. If the shield is floating, that voltage just goes straight into whatever's receiving the signals. If the shield is solidly grounded, it shunts that voltage to ground. The important fact is, signals move with respect to the shield; if the shield itself is moving with respect to the circuit, so too will the signals; fix the shield and the signals stay in place. This must be done at both ends. (Occasionally a shield is only grounded at one end, which serves as shielding against electric fields, at low frequencies. It does absolutely nothing for magnetic or radiated induction.)Tim

author: VK3DRB
author_rank: Super Contributor
timestamp: November 22, 2021, 04:07:05 am
content: EMC issues can be frustrating. Have you got chip ferrites on the PSU voltage rails to the ST micro? Horrible to do, but you might be able to cut tracks/solder a small SMD ferrite. Some micros require this. Same with external SDRAM and Flash chips. It is possible the RF is getting into the supply rails.Recently I designed a board that switches about 3A at 1kHz in a non-metallic enclosure. To mitigate EMC issues, the switching FET is close to the load, tracks layout is very short, there is a ferrite in series with the load, there is a decent capacitor on the supply near the load, there are no adjacent co-linear signal tracks nearby and the PCB is 4-layer with a dedicated ground plane.Good luck... the fact you know shielding works is a good start.Incidentally, what makes me paranoid is ESD issues, especially in medical devices (+/-15kV through air, +/-8kV direct contact), than emissions or immunity. ESD testing is brutal and you can't actually put an oscilloscope on the thing without a HT probe unless you want to destroy your oscilloscope. You usually cannot see where the arc is occurring. Putting your tongue or another appendage on the board as you zap it doesn't work either. I absolutely hate ESD issues!