  Tunnel devices based on ferroelectric Hf0.5Zr0.5O2 (HZO) barriers hold great
promises for emerging data storage and computing technologies. The resistance
state of the device can be changed by a suitable writing voltage. However, the
microscopic mechanisms leading to the resistance change are an intricate
interplay between ferroelectric polarization controlled barrier properties and
defect-related transport mechanisms. Here is shown the fundamental role of the
microstructure of HZO films setting the balance between those contributions.
The oxide film presents coherent or incoherent grain boundaries, associated to
the existence of monoclinic and orthorhombic phases in HZO films, which are
dictated by the mismatch with the substrates for epitaxial growth. These grain
boundaries are the toggle that allows to obtain either large (up to 450 %) and
fully reversible genuine polarization controlled electroresistance when only
the orthorhombic phase is present or an irreversible and extremely large
(1000-100000 %) electroresistance when both phases coexist.
