In the previous section, we have discussed the diffusion potential across a pn junction.
You now understand that the Fermi level is the reference energy level for the pn junction.
In the case of a metal-semiconductor junction, a metal and a semiconductor are joined together so that their Fermi levels line up with no external bias. Although the Fermi level is used as a reference point for the diffusion potential (barrier potential) of a pn junction, for a metal-semiconductor junction the work function is used as a reference point. The characteristics of the metal-semiconductor junction depend on whether the work function of the metal is greater or less than that of the semiconductor as described later.
These are some terms used here:
When an n-type semiconductor with a work function of Φn and a metal with a work function of Φm are joined together, the characteristics of the metal-semiconductor junction depend on the difference between Φn and Φm. A Schottky junction is formed when Φm > Φn whereas an ohmic junction is formed when Φm < Φn. The work function of a semiconductor is the Fermi level minus the vacuum level.