Hi guys,
A really bad+silly hardware bug is making us sleepless. We are using a SPI based display which is being controlled using a ESP32-S3 module. We are using a BSS214 MOSFET to control the power to the display so we can turn on and off whenever we want to save the power as it's a battery operated device.
We have a P-Channel circuitry to switch between USB and VBAT voltages whenever one of the power supplies are not present, which looks like this

And the Display circuit looks like this (here GND is not board ground, just the display's ground).

it looks like if either USB or Battery alone are connected the board is working fine. However when the battery is connected if I try to connect USB and program the board a kind of glitch is happening on the display and the board is going into an unknown state. I am not sure if this is the correct way to handle a N-channel MOSFET to drive displays? I am suspecting that when the USB is plugged there is some kind of ground potential change and the SPI channel's ground reference is changing there by causing havoc in interpreting the signal date hence the glitch. But this is just an assumption, I like experts to clarify it.
Any help is appreciated. I am attaching full schematics for your reference.
A really bad+silly hardware bug is making us sleepless. We are using a SPI based display which is being controlled using a ESP32-S3 module. We are using a BSS214 MOSFET to control the power to the display so we can turn on and off whenever we want to save the power as it's a battery operated device.
We have a P-Channel circuitry to switch between USB and VBAT voltages whenever one of the power supplies are not present, which looks like this

And the Display circuit looks like this (here GND is not board ground, just the display's ground).

it looks like if either USB or Battery alone are connected the board is working fine. However when the battery is connected if I try to connect USB and program the board a kind of glitch is happening on the display and the board is going into an unknown state. I am not sure if this is the correct way to handle a N-channel MOSFET to drive displays? I am suspecting that when the USB is plugged there is some kind of ground potential change and the SPI channel's ground reference is changing there by causing havoc in interpreting the signal date hence the glitch. But this is just an assumption, I like experts to clarify it.
Any help is appreciated. I am attaching full schematics for your reference.
Attachments
-
196.2 KB Views: 7




