Noise/Ground-Bounce/Power Integrity Issue causing MCU to crash. - Page 1
Forum section: electronics / beginners

author: DragonLord64
author_rank: Newbie
timestamp: January 18, 2024, 02:40:23 am
content: I have a problem with a custom board I built. I made many mistakes in this version, but only one issue makes it unusable. I have uploaded the Kicad files and some images.The issue may be a combination of factors, but I'm trying to learn exactly what I did wrong to cause this issue. Any help is appreciated.-------Design Summary:-The design is a battery-powered BLE remote using an nRF52810 and LiPo battery.-The battery is connected to a charge controller IC. The output of the charge controller IC is connected to a 3.3V linear regulator. The linear regulator powers the nRF52810.(EDIT)Stack up:SIGNALVSSVCCSIGNALIMPORTANT NOTE: The antenna matching network is NOT properly matched. I have a 4.7nH inductor instead of the recommended 3.9nH.-------Problem:The issue occurs when I use the radio/antenna of the nRF MCU.-When on battery power (3.7V through a 3.2V linear regulator), when the antenna turns on, huge peaks and noise appear on the nrf52840 VDD pin (See image). This appears the crash the MCU.-When the linear regulator is bypassed (nRF powered with external 3.3V), the device works as expected and the BLE connection is stable. Small spikes are visible on the VDD pin.-When the voltage going into the linear regulator is LESS than 3.3V (the regulation voltage), the device works as expected and the BLE connection is stable. Small spikes are visible on the VDD pin.-----------Test that DID NOT work- Placing a variety of coupling capacitors near the linear regulator and on the nRF52810 radio decoupling pin.- reducing the radio transmit power-----------Test that DID work- The board runs a 'blinky' example on battery power. I have checked with a debugger.- Other code seems to run normallyThanks for the help.

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 18, 2024, 02:56:19 am
content: Schematics and pcb pictures are incomplete, missing LDO, nrf decoupling and any other detail that could be important.

author: ArdWar
author_rank: Frequent Contributor
timestamp: January 18, 2024, 03:09:33 am
content: It sure looks like your LDO is not stable, or not even work at all. I'd try loading the LDO with increasing current and see how it regulate first before troubleshooting PCB design.Anyway design wise it doesn't seem to be anything particularly egregious, well, I assume there are two more layers for VDD and VCC. Just that at a glance there doesn't seem to be enough input and output capacitor close enough to the LDO. And the way you arrange the decoupling caps for nRF are backwards. put the caps between via and pins, not the other way around.Oh, and set your scope probe to 10x while at itQuote from: DavidAlfa on January 18, 2024, 02:56:19 amThis looks like the LDO

author: forrestc
author_rank: Unknown
timestamp: January 18, 2024, 06:02:58 am
content: I don't see anything obvious that should cause your specific issue. About the only thing that bothers me is that the Vin CAP for the linear regulator isn't exactly "ACAP", but since you've thrown caps across the input, I don't know what else to suggest.But, for your future designs, here are some random design improvement thoughts: I don't think any of these will be the cause of your problem, but they will help improve signal integrity across the board.First of all, I really dislike the split planes on layer 3. Just flood the whole thing with Vdd, then use thick top-side traces to bring +5 to the battery charge controller, and also to connect all the VCC pins. It might make sense to rotate the BQ part 90 degrees to make routing easier. That way 5V will be on the side of the package where it's coming from the USB connector. It also makes it easer for the Vbat to connect off the bottom side of the board,The 4 pin display header/connector near the USB probably should move to the bottom of the board unless there is a really strong reason for it to be where it is. That would allow you to move the BQ part to be closer to the USB connector, and shorted the I2C data lines. Same with all of the associated power switch parts - you could put them to the left of the connector so it's easier to bring vcc to them.To sort of repeat myself, but be a bit more "big picture":I'd probably try hard to across the center of the board do something like as follows: USB power input, Capacitors for +5V from USB, BQ part, capacitors, regulator, capacitors. Then I'd use a lot of vias to put get VDD onto Layer 3. That's your power network, and it should flow nicely across the board without any vias if you can avoid them. Move and rotate the parts to match your schematic flow, and don't worry about having everything the same orientation.I'd probably use a top-side flood to connect A9 and B9 on the USB connector to the filter cap and into the BQ part. I'd then use another top side flood to connect the BQ part output to the voltage regulator. I'd make sure I had a good solid ground plane to connect all of those parts on the top if possible. More likely you'll need to rely on the ground plane. One thing I do notice is that on the BQ part you rely on a via to connect it and all the ground pins on the part. Personally I'd just flood this part with ground and directly connect the center pad to each pin connected to ground. That is, pins 4, 5, 8 and 14 should be directly attached to the center ground pad. According to the datasheet, you may also need more thermal vias in the center pad. If you were mass producing this, you'd need to figure out if the vias needed to be plugged as solder can wick down them, and you'd end up with insufficient solder on the center pad.I'd probably move Vbat so it directly below the BQ part. I.e. comes off the BQ part directly "down" to the connector. I would then move the display header to the right of that and ensure all the digital stuff ends up close to the micro.

author: Chalcogenide
author_rank: Regular Contributor
timestamp: January 18, 2024, 07:03:36 am
content: I just had a look at the datasheet of the LDO: it is really really bad! It may be low quiescent, but the bandwidth is really low and the response to varying the load current is SLOW... A 50 mA step at 3.6V out causes a dip of almost half a volt that recovers in 100 us... I don't think you will get the design working with this regulator, try looking for something with a better response (if you don't need as low as a quiescent current, an AP2205 should do the trick).

author: forrestc
author_rank: Unknown
timestamp: January 18, 2024, 07:20:56 am
content: Quote from: Chalcogenide on January 18, 2024, 07:03:36 amI think I'd be more worried about the other direction. Dropping from 100mA to 50mA ends up with that same sized spike (but in the opposite direction). Considering the absolute maximum rating for the micro is 3.9V, that is precariously close to the damage threshold.But... based on the OP's oscilloscope photos, it seems like the drop is consistent with what I'd expect based on your discovery.

author: selcuk
author_rank: Frequent Contributor
timestamp: January 18, 2024, 07:23:13 am
content: There is a short between DCC and DEC4 on the MCU. What is the purpose of it? Recommended connection is different on the datasheet. I've attached an image showing MCU connections of a functional board. You may compare it with your design. Ignore the values of the components on the antenna path since they depend on the PCB design.

author: DragonLord64
author_rank: Newbie
timestamp: January 18, 2024, 04:13:10 pm
content: Thanks for pointing that out. I did not think about the voltage spike in the other direction

author: DragonLord64
author_rank: Newbie
timestamp: January 18, 2024, 04:15:33 pm
content: Quote from: selcuk on January 18, 2024, 07:23:13 amI was following the datasheet for the internal LDO configuration. However, I may have misinterpreted it (see screenshot).

author: DragonLord64
author_rank: Newbie
timestamp: January 18, 2024, 04:16:34 pm
content: Quote from: forrestc on January 18, 2024, 06:02:58 amThank you for this. Great points and suggestions.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: January 18, 2024, 10:21:37 pm
content: Quote from: DragonLord64 on January 18, 2024, 04:15:33 pmYou have. That "DEC4" label goes with the lineunderneathit. The DCC pin appears to be not connected to anything.

author: DragonLord64
author_rank: Newbie
timestamp: January 19, 2024, 02:08:58 am
content: Quote from: HwAoRrDk on January 18, 2024, 10:21:37 pmLol, I can't read. Thanks for pointing this out.Does anyone know if the DCC pin does anything when not enabled? I'm going to try cutting the trace tomorrow to see if that changes anything.

author: selcuk
author_rank: Frequent Contributor
timestamp: January 19, 2024, 08:29:33 am
content: DCC pin seems disconnected but I don't know the exact behavior. I used the internal LDO and DC-DC converter (not at the same time) after populating those inductors between DCC and DEC4 without a problem.There is a possibility that a SDK function enables DC-DC converter and causes the issue here. You may not intentionally enable it but please check the functions you are calling to enable RF, low power etc.