I have come across a gate driver circuit (proprietary) that measures open-collector current and sets a flag if the current exceeds a threshold (say 20 mA) to protect the NPN transistor.
This is the "schematic" from the datasheet. How would such circuit be implemented to be inexpensive and reliable?
Edit: My question is how can this open-collector circuit be modified to also measure the npn transistor current? The basic open-collector functionality is obvious. I'm interested in how to protect this open-collector circuit from excessive currents caused by too small value of R_pullup.