How the formation of interfacial charge causes hysteresis in perovskite solar cells

In this study, we discuss the underlying mechanism of the current–voltage hysteresis in a hybrid lead-halide perovskite solar cell. We have developed a method based on Kelvin probe force microscopy that enables mapping charge redistribution in an operating device upon a voltage- or light pulse with sub-millisecond resolution. We observed the formation of a localized interfacial charge at the anode interface, which screened most of the electric field in the cell. The formation of this charge happened within 10 ms after applying a forward voltage to the device. After switching off the forward voltage, however, these interfacial charges were stable for over 500 ms and created a reverse electric field in the cell. This reverse electric field directly explains higher photocurrents during reverse bias scans by electric field-assisted charge carrier extraction. Although we found evidence for the presence of mobile ions in the perovskite layer during the voltage pulse, the corresponding ionic field contributed only less than 10% to the screening. Our observation of a time-dependent ion concentration in the perovskite layer suggests that iodide ions adsorbed and became neutralized at the hole-selective spiro-OMeTAD electrode. We thereby show that instead of the slow migration of mobile ions, the formation and the release of interfacial charges is the dominating factor for current–voltage hysteresis.


Introduction
Herein we report on experiments to visualize local charge re-distribution in lead halide perovskites that are responsible for current-voltage hysteresis. We found that interface charges localized at the electron-selective contact generated an electric field that modified the charge extraction in the device. Thus, the formation and release of these ionic interface charges instead of a slow ionic charge transport determine the time scales for current-voltage hysteresis in perovskite solar cells.
Recently, consensus has been reached that current densityvoltage ( J-V) hysteresis in perovskite solar cells is connected to ion migration in the perovskite layer. 1 In this picture, space charge layers of mobile ions at the electrodes shield the electric field in the perovskite layer on timescales of milliseconds to seconds. 2 Such a screening of the electric field in the perovskite layer has been observed both at short-and open circuit conditions. 3,4 This modification of the internal electric field influences the charge extraction efficiency and recombination losses inside the perovskite layer and the photocurrent becomes dependent on the voltage scan direction. 5,6 However, until now it is unclear if the timescales of the ion migration itself are the sole reason for the slow response of the electric field or if other factors such as interface dipoles [7][8][9] or chemical reactions of ionic species at the interfaces 10 play a role, too.
In the commonly used model that explains hysteresis by ion migration, the ionic species are evenly distributed and free to move throughout the entire perovskite film 1,5,6,11,12 (Fig. 1a). Experimentally, the lateral migration of methylammonium and iodide species has been observed in perovskite films, proving that mobile ionic species exist. [13][14][15][16] The exact mechanism of the migrating process and how it affects the charge extraction perpendicular to the perovskite film, however, remains unclear. In particular, it is still unclear (i) what the exact mechanism of migration is (hopping via vacancies or via interstitials 17 ), (ii) where exactly the mobile ions are located (across the film or at grain boundaries or interfaces) and (iii) what the migration paths are (bulk transport 15 or grain boundaries, 18 Fig. 1a and b).
The simple bulk ion migration model is not sufficient to explain the observation that the incorporation of a suitable material in the electron transport layer (ETL), such as mesoporous TiO 2 , 19   or SnO 2 , 24 in perovskite solar cells results in almost hysteresis-free devices. In the case of SnO 2 , the reduction in hysteresis was attributed to a more efficient electron extraction, reducing recombination losses. 24 In the case of PCBM, the ion migration was suggested to be suppressed by passivating interfacial defects. 25 The strong influence of the ETL material demonstrates the crucial role of interfaces for hysteresis. Nevertheless, the exact interplay between ion migration and interface effects remains unexplored. In order to solve the puzzle, methods that can map the spatial and temporal evolution of the electric field in the device are required.
We developed such a time-resolved method based on Kelvin probe force microscopy (KPFM) 3,4,[26][27][28][29][30][31] by decoupling the spatial mapping and the recording of the temporal evolution of the local contact potential difference (CPD). Thereby, we achieved sub-ms KPFM time resolution (Fig. 1c and Methods section). We used this time-resolved (tr-)KPFM to follow the charge re-distribution in a hysteretic methylammonium/formamidinium lead iodide/bromide perovskite solar cell device (details on the composition in the Methods section) upon applying an external voltage or a light pulse. We found that the electric field across the perovskite layer was screened via a combination of localized positive interface charge at the ETL and a negative ionic space charge across the entire perovskite layer. Our experiments demonstrate, that the electric field generated by the surface charge was the dominating factor for screening electric fields in the perovskite layer.

Dynamics with pulsed voltage
For our study, we chose a perovskite solar cell with particularly pronounced hysteresis, as we expected to observe significant effects of internal charge re-arrangement in such a device. To gain access to the cross section, the device was cleaved and a 50 mm wide region was polished with a focused ion beam procedure (see also Methods and ref. 3 and 26). The procedure only had minor influence on the performance and the hysteresis in the device, with efficiencies of 12.2% (upward scan) and 16.5% (downward scan, Fig. 2a, and Fig. S2, ESI †). On the cross section, we identified the different layers of the perovskite solar cell from the scanning force microscopy (SFM) phase signal of the mechanical tip oscillation (Fig. 2b). For more clarity, we have marked the interfaces to the active perovskite layer in the phase image and in all following images with dashed lines. In the CPD map recorded before the voltage pulse, the potential in the perovskite layer was flat, i.e. a built-in potential, which might have been introduced by the difference of work functions of contact layers, was shielded by the internal charge distribution ( Fig. 2c and Fig. S2, ESI †). This CPD distribution represents the equilibrium potential distribution that we refer to as the static CPD.
Using tr-KPFM, we were able to reconstruct CPD maps with a temporal resolution of 0.5 ms (see ESI † and Methods for more details). Movies generated from these KPFM snapshots are provided as ESI. † For the pulsed voltage experiments, we applied a 750 ms long voltage pulse of À0.5 V to the FTO electrode while the gold electrode was grounded. The voltage pulse simulates a forward (0 V -À0.5 V) and backward (À0.5 V -0 V) voltage Illustration of potential (U), electric field (black arrows) and ion distribution for different migration paths for mobile ions: (a) if ions can migrate through the bulk of the perovskite layer, uniform electrostatic double layers (EDLs) will form at either electrode that screen the external device potential. (b) If ions migrate preferentially at grain boundaries, the EDLs and the electric field distribution will be heterogeneous. (c) In time-resolved KPFM, the CPD response to a voltage-or light-pulse is recorded in a pointwise spectroscopy approach subsequently at different positions on the sample. scan when applying a positive voltage to the gold cathode during a JV scan. To distinguish between transient and static charge distribution, we subtracted the static CPD ( Fig. 2c) from the CPD maps at later times. These transient DCPD maps contain information about charge re-distribution dynamics caused by the external voltage pulse at a given time after applying the voltage pulse. In the DCPD map, a potential gradient across the perovskite layer was present 2.5 ms after switching on the external voltage (Fig. 3a). The corresponding section graph of the potential distribution (black curve Fig. 3b) shows a strong asymmetry: at the spiro-OMeTAD/perovskite interface, the potential bends downwards, becoming flatter towards to perovskite/SnO 2 interface. At the interface to the SnO 2 /FTO electrode, the DCPD drops by more than 200 mV within less than 100 nm. Section graphs from the same position recorded at 10 ms and 700 ms after the switching (red and blue curve in Fig. 3b) show that the magnitude of the potential decay across the perovskite layer decreased over time. Now, the majority of the potential (B400 mV) drops at the perovskite/SnO 2 interface, effectively screening the external potential from the perovskite layer. The sharp potential step at the perovskite/SnO 2 /FTO interface corresponds to a dipolar charge with positive charges on the perovskite side and negative charges on the SnO 2 /FTO side (red and blue shaded areas at the perovskite/SnO 2 interface in Fig. 3b; see Methods section for a note on how to identify charges from the potential distribution).
Comparing the CPD distributions for 10 ms and 700 ms shows that it took hundreds of milliseconds to reach an equilibrium potential distribution across the perovskite layer (Fig. 3b). Relaxation times on millisecond timescales have been attributed to the slow migration of ionic species inside the perovskite layer, 2,5,6,32 suggesting ion migration as the underlying mechanism for the observed CPD dynamics. The dimensions of the  During the first 2.5 ms both on the FTO and inside the perovskite layer the local potential decreased (gray arrows). Afterwards, the potential on the FTO electrode decreased and the potential in the perovskite layer increased (green arrows). The increase was caused by a slow screening of the internal electric field, mainly by positive interface charges at the perovskite/SnO 2 interface that were compensated by electrons on the FTO side. Here, regions of positive charge (convex curvature) are shaded in red and negative regions (concave curvature) in blue. (c) To explain the asymmetry in the potential distribution, we propose that positive charges are localized at the perovskite/SnO 2 interface. A possible scenario for localization is the formation of an interlayer with locally lower activation barrier for iodide/iodide vacancy formation. Thereby, the migration of iodide into the perovskite is possible (A), but the migration of vacancies is blocked (B). imaging area were larger than the typical grain size of B100 nm for this solar cell type. Nevertheless, both potential distribution in the perovskite layer and the surface charge at the perovskite/SnO 2 interface showed a homogeneous CPD contrast along the perovskite layer. A CPD contrast could be an indication for faster ion migration along grain boundaries, 16,33 for example (Fig. 1b). The absence of a CPD contrast is therefore an indication of bulk ion transport (Fig. 1a). To quantify the charge at different positions in the cell, we calculated the charge carrier densities based on the onedimensional Maxwell equation, that connects the electric field, E, with the charge carrier density, r: (ee 0 : vacuum and relative dielectric permittivity, respectively).
Assuming that the charges are localized within a thin layer of thickness Dx with a surface charge density s, we can write the volume charge density as r = s/Dx and obtain for the change in electric field over Dx: From the DCPD trace 2.5 ms after switching on the voltage, we calculated via linear fits to the potential that the electric field changed from 0.4 kV cm À1 in the perovskite bulk to 24 kV cm À1 directly at the perovskite/SnO 2 interface. Assuming a homogeneous relative permittivity 34 of e = 62 across the perovskite layer, we obtain a positive charge density of 1.1 Â 10 À7 C cm À2 , corresponding to a capacity of B220 nF cm À2 . Towards the end of the voltage pulse, the interface charge further increased and finally reached 2.6 Â 10 À7 C cm À2 (B500 nF cm À2 ). However, impedance spectroscopy studies have found higher capacitances 9,23,35 on the order of mF cm À2 -mF cm À2 . These higher capacities indicate that the surface charges could be confined to an even thinner region of a couple of nanometers, which is currently below the lateral resolution of KPFM. Inside the perovskite layer, the potential was exponentially decaying towards the FTO side with a decay length of (161 AE 15) nm, corresponding to a negative space charge density (dashed gray fit in Fig. 3b). We assume that this charge is caused by ionic space charge. To estimate the ion concentration, we assume that the mobile ions in the perovskite form an electrostatic double layer (EDL) towards the spiro-OMeTAD interface, similar to a solid-state electrolyte. 6,11,32 The screening length of the EDL in an electrolyte with charge carrier concentration c and dielectric permittivity e can be estimated by the Debye screening length: 36 (e: elemental charge, k B T: thermal energy at temperature T). The only free parameter in eqn (3) is the charge carrier concentration c 0 . Using a dielectric permittivity 34 of e = 62, we calculate the ion concentration in the perovskite layer as (1.7 AE 0.3) Â 10 15 cm À3 . This value is four orders of magnitude lower than the ion concentrations of around 10 19 cm À3 calculated from measurements of activation energies for defect formation. 32,37 Using our results, the total ionic charge in a B400 nm thick perovskite layer is (1.1 AE 0.2) Â 10 À8 C cm À2 . Thus, the amount of negative ionic charge in the perovskite layer only accounts for B10% of the localized positive charge at the perovskite/ SnO 2 interface. This discrepancy shows that additional processes happen that either increase the positive interface charge or that neutralize parts of the negative space charge.
The commonly used model for ion migration in perovskite solar cells assumes that mobile ions and ion vacancies are evenly distributed across the perovskite layer. Our observations of a purely negative diffuse space charge in the perovskite and highly localized positive surface charge at the perovskite/SnO 2 interface clearly contradict this solid-state electrolyte model. Here, we would expect the EDLs to form on either side of the perovskite layer. 5,6,32 Due to symmetry, the EDLs should -once equilibrated -generate potential steps of the same magnitude and with the same screening length at either side of the perovskite layer. 11,32 However, what we observed here and in our previous KPFM cross section study 3 is a strong potential drop at the perovskite/ETL interface and a much weaker potential screening towards the perovskite/HTL interface. This asymmetric screening indicates that different screening mechanisms act on both of these interfaces.
Richardson et al. have found an asymmetric potential distribution due to a complete depletion of the mobile ionic charge in a 100 nm wide region at one interface and a high concentration of ions at the other interface. 12 In such a depletion region, the potential would deviate from the exponential behavior of an EDL. In our experiments, we did not observe such deviations over the duration of the voltage pulse (Fig. S3, ESI †).
As a model to explain the observed voltage transients and potential distributions, we suggest that free iodide/iodide-vacancy pairs are generated upon application of an electric field in a thin interlayer, thinner than the lateral KPFM resolution of 50 nm, close to the perovskite/SnO 2 interface (Fig. 3c). The here generated iodide species are free to move across the entire perovskite layer, whereas the vacancies remain localized at the perovskite/SnO 2 interface (A in Fig. 3c). The assumption of immobile positive ions is necessary to keep the positive charges localized at the perovskite/ SnO 2 interface. Here, we can only speculate about the physical reason for the formation of the interlayer: one scenario could be a field-induced destabilization of the perovskite crystal structure close to the interface. Thereby, the activation energy for the formation of an iodide defect could be locally lowered. 17 Such spatial variations in the activation energies could also explain the differences in the ion densities between our estimation and the results and the literature, 32,37 as macroscopic measurements cannot account for spatial variations in the activation energy. The interfacial iodide vacancies would be immobile because they cannot be filled by iodide from outside the surface region (B in Fig. 3c). In our model, iodide would therefore migrate via interstitial sites/Frenkel defects.
One explanation for the surplus of surface charge at the perovskite/ETL interface would be that this interlayer of destabilized perovskite is strongly polarizable, inducing the formation of a surface dipole (higher local e). In this case, the polarization at the interface would be following almost instantaneously any change in the external voltage. To test if this is the case, we next analyzed the CPD dynamics after the voltage pulse. Upon switching off the external voltage, the DCPD jumped within 6 ms to a positive value inside the perovskite layer (Fig. 4a, t = 6 ms). The distribution of this overshoot voltage is again homogeneous along the perovskite layer and we did not observe strong fluctuations in the DCPD signal, e.g. caused by grain boundaries. The section graphs in Fig. 4b reveal that the DCPD increases linearly from the spiro-OMeTAD side towards the SnO 2 side. During the voltage decay up to 500 ms after switching off the external voltage, the potential remained linear within the perovskite layer. Such a linear DCPD distribution corresponds to a homogenous electric field inside the perovskite layer with no space charges in between the electrodes. The electric field is generated by negative charges localized in a 50 nm wide region at the spiro-OMeTAD/perovskite interface and a dipolar surface charge in a 170 nm wide region at the perovskite/SnO 2 interface, respectively (red and red/blue shaded areas in Fig. 4b).
To follow the decay of the electric field over time, we analysed the DCPD maps over 500 ms after the voltage pulse (Fig. 4b). The section graphs show that although the magnitude of the positive DCPD decreased, the overall triangular shape of the section curve remained unchanged. Over the measurement time, the space charge regions remained confined in regions at the selective contacts. To obtain the timescale of the CPD decay after the switching, we analysed a local CPD transient curve recorded close to the perovskite/SnO 2 interface. We fitted the decay with an exponential curve with a decay time of (125 AE 1.4) ms (Fig. 4c). This timescale for the surface charge relaxation is a factor of 40 slower compared to the formation time. This stabilization indicates that the surface charge does not simply originate from a region of increased polarizability. Rather, the charge is stabilized directly at the perovskite/SnO 2 interface, e.g. by the molecular interface structure 38 or chemical reactions. 10,13 The absence of negative space charges in the perovskite layer suggests that the dynamics of the mobile ions are much faster than we could resolve in our measurements and thus play no role for the observed decay dynamics. This is a further confirmation for our earlier conclusion that the observed ion migration and the surface charge are two separate phenomena.

Model for hysteresis
The results on the dynamics of the internal electric field so far can directly explain the strong hysteresis in the investigated device: during the upward scan of the voltage, the electric field in the device drives electrons and holes to the opposite electrode and the extraction efficiency is lower ( Fig. 5a and b). During the relaxation of the electric field in the perovskite, we propose that ions adsorb at the spiro-OMeTAD/perovskite interface and ''freeze'' the charge distribution (Fig. 5c). During the downward scan, the strong reverse field induced by the stabilized charge distribution supports the charge extraction and a higher photocurrent is measured (Fig. 5d). Next to the influence on the electronic drift, the presence of interfacial charges could also influence the charge extraction via energetic barriers or recombination at the interfaces. 5,39,40 To search for a possible stabilization mechanism for the charge distribution after switching off the external voltage, we further analysed the dynamics of the negative space charges in the perovskite layer after switching on the voltage. Here, we found that the EDL decay lengths varied for different times after the voltage pulse. In particular, the decay length reached a minimum of (128 AE 13) nm at 5.5 ms and recovered to a value of B200 nm at 10 ms after switching on the voltage (Fig. 6a).
Naively, we could assign the variation in the screening length to a non-equilibrium ion distribution after a change in the electrode voltage. However, in numerical simulations of the ion dynamics upon a change in the applied voltage the screening length remained constant. 41 We can therefore conclude that the observed ion distributions are in a quasi-equilibrium at all measuring times. Using eqn (3), we again calculated the time-dependent ion concentration inside the perovskite layer from the measured screening length. Starting from a value of (1.2 AE 0.5) Â 10 15 cm À3 (0.5 ms), the charge density increased to (2.7 AE 0.6) Â 10 15 cm À3 at 5.5 ms after the switching, and decreased back to 0.3-1 Â 10 15 cm À3 within the following 10-20 ms (Fig. 6b). We observed that all potential curves overlap at a point B50 nm away from the spiro-OMeTAD layer (grey horizontal bar in Fig. 6a). The formation of a potential elbow in this point indicates a higher charge density, e.g. connected to the formation of a Helmholtzlayer of localized ions at the interface to the spiro-OMeTAD (Fig. 5c).
Contreras et al. 42 have suggested that a specific interaction between the methylammonium cation and the TiO 2 interface is responsible for slow (0.1-10 Hz) dynamics in perovskite solar cells. From impedance spectroscopy and bias-dependent capacitance measurements, they concluded that methylammonium cations accumulate at the TiO 2 interface. Although we found an accumulation of positive charge at the anode interface, as well, our observation of a negative space charge in the perovskite together with the strong localization of the positive charge contradict this interpretation. Furthermore, Contreras et al. found reduced slow dynamics in mixed methylammonium/ formammidinium (60/40) lead iodide devices. Our devices were made with a (1/5) methylammonium/formammidinium ratio, making a specific cation interactions of methylammonium as the sole reason for hysteresis unlikely.
Carrillo et al. have discussed possible chemical reactions of mobile iodide with TiO 2 and spiro-OMeTAD in context of hysteresis and device degradation. 10 They suggested that weak Ti-I-Pb bonds could ''facilitate interfacial accommodation of moving iodide ions''. In this model, the release of iodide from the interfacial layer should be slower, as it is an endothermal process. However, we observed that the formation of positive charge at the anode interface (corresponding to the release of iodide) was much faster than the reverse process. Here, a reversible chemical reaction or complexation of the iodide with positively charged spiro-OMeTAD (Fig. 5c, also suggested by Carrillo et al. 10 ) could explain both the observed timedependent negative charge density and the asymmetry in the charge distribution with a surplus of positive charges at the perovskite/SnO 2 interface. Nevertheless, hysteresis has been observed in devices without any hole transport layer, 43 suggesting that the observed effects are not specific for spiro-OMeTAD. Recent KPFM results suggest that the position of this interface charge, i.e. anode or cathode interface, can be influenced by the  composition of the perovskite, namely by the iodide excess in the precursor solution, 4 suggesting that the interface charge is located within and influenced by the perovskite crystal. Independent of the stabilization mechanism, the slow release of bound ions from the perovskite/hole transporter interface explains the slower relaxation dynamics upon switching off the external voltage. The strong electric field will make the ion transport across the perovskite layer very fast, explaining the absence of space charge (Fig. 5d).

Dynamics with pulsed illumination
To test if similar effects are present in an illuminated device, we performed experiments with light pulses generated by a white light source. The device was set to open circuit conditions with the gold cathode grounded and the FTO anode floating. This situation simulates the so-called light-soaking conditions when the device is illuminated under open circuit for a couple of minutes before recording a j-V curve. Upon switching on the light, the electrode potential on the FTO jumped to BÀ170 mV within B2 ms and slowly decreased over the following three seconds by another B150 mV (see ESI †).
In the DCPD map 2.5 ms after the switching, we again found a strong interface charge at the perovskite/SnO 2 interface. However, almost no potential gradient in the B400 nm thick perovskite layer could be observed (Fig. 7a). Only when averaging over entire DCPD map (Fig. 7b) we found a weak electric field of B870 V cm À1 over the perovskite layer. At later stages, the potential in the perovskite layer became flat again with a negative offset of 30-40 mV (orange curve in Fig. 7b), comparable to the offset that we observed in the experiments with pulsed voltage (Fig. 6a). Possible reasons for the observation of a much weaker electric field and the absence of curvature in the potential are the higher noise level due to intensity fluctuations in the light source or the relatively slow switching time of B10 ms of its mechanical shutter. Moreover, the screening of the field could be stronger due to a higher photo-induced ion concentration 44 or due to photo-excited electronic carriers, although we would expect symmetric screening at both electrodes in this case. The observation of a DCPD offset within the perovskite layer at later times indicates that negative ionic charges accumulated at the spiro-OMeTAD/perovskite interface (Fig. 5c). The absence of an exponentially decaying potential in the perovskite layer indicates again that mobile ions play a minor role in the electric field screening compared to the perovskite/SnO 2 interface charge.
After switching off the illumination, we observed a similar DCPD distribution (Fig. 7c) and dynamics (Fig. 7d) as observed after the voltage pulse (Fig. 4). The maximum DCPD values at the perovskite/SnO 2 interface were B180 mV, which corresponds to B60% of the externally measured photovoltage. After the external voltage pulse, we observed a maximum DCPD signal of B300 mV at an external voltage of 500 mV, which corresponds to roughly the same voltage ratio of 60%. The observation of an identical charge decay behavior suggests that the same charge re-distribution processes occurred during the illumination and the application of the external voltage.

Conclusion/summary
With tr-KPFM, we established a method that is able to map and track the potential distribution in perovskite solar cells with sub-ms resolution. Our results demonstrate that currentvoltage hysteresis in perovskite solar cells is dominated by the dynamics of the formation and release of ionic charges at the interfaces. This interface charge formed within B3 ms after switching on an electric field across the device and decayed 40 times slower than it formed. This asymmetry in the kinetics indicates that the surface charges are stabilized at the interfaces of the perovskite towards the electrodes. One possible scenario for a stabilization of the negative charge at the cathode interface would be a chemical binding or complexation of ions at the interfaces. 10,14 Although we found that the interface charges clearly dominated the electric field dynamics, we measured an additional negative ionic space charge in the perovskite layer upon switching on the electric field. The absence of strong contrast in the direction parallel to the electrodes shows that the observed ion migration was not localized at grain boundaries. The asymmetric potential distribution suggests that a thin layer of destabilized perovskite exists at the interface to SnO 2 , where mobile iodide and immobile iodide vacancy pairs are generated (Fig. 5b). Furthermore, we found a time-dependent ion concentration that indicates chemical binding of iodide at the spiro-OMeTAD interface (Fig. 5c).
Our observations underpin the importance of the interfaces for the device behaviour in a perovskite solar cell. We have demonstrated that tr-KPFM can provide a comprehensive understanding of the exact role that ion migration has on hysteresis.

Methods
Planar perovskite solar cells with mixed formammindinium/ methylammonium cations and mixed Br/I halides were prepared using an antisolvent method.  Perovskite deposition. The perovskite solution was spin coated in a two steps program (10 s at 1000 rpm and 20 s at 6000 rpm). 20 s prior to the end of the second step, 100 mL of chlorobenzene was poured on the spinning substrate. After spin coating, the substrates were annealed at 100 1C for 1 h in a nitrogen glove box.

Cross section preparation
The cells were cleaved and polished with a focused ion beam (FEI Nova 600 Nanolab). 3,26 Thereby, the effect of the focused ion beam polishing is minimized by using a 2 mm thick protective layer of platinum and by milling deep into the substrate. In an earlier study using this preparation method, no traces of Ga were found in the active layers of the solar cell. 26 Furthermore, the efficiency and hysteretic behaviour (measured with an ABET Class ABA solar simulator and a Keithley2100 source meter) remained almost unchanged (Fig. S1, ESI †). To further minimize the effect of ion contamination, we only investigated changes in the potential distribution, where any influence on the static CPD, i.e. changes in the work function due to ion doping etc., is subtracted. Nevertheless, cleaving the cell and exposing the cross section is creating an additional grain boundary, which could have an influence on the charging dynamics. Such an influence, however, should be homogeneous along the cross section, because the impact of a grain boundary or residual ions should be the same at the top and at the bottom of the cell. What we observed, however, was an asymmetric charging with stronger DCPD signals towards the perovskite/SnO 2 interface. While we cannot entirely exclude an influence of the cross section, these considerations ensure us that the observed effects represent the charging dynamics in the bulk of the solar cell.

Time-resolved KPFM
The tr-KPFM measurements were conducted on a MFP3D scanning force microscope (Asylum Research/Oxford Instruments) in a glovebox filled with dry nitrogen. We used a PtIr coated cantilever (Bruker SCM-PIT-V2) with a resonance frequency of 75.9 kHz, spring constant of 3.6 N m À1 and nominal tip radius of 25 nm. The KPFM detection was done in frequency modulation (FM) mode on an external HF2 Lock-In amplifier (Zurich Instruments) at a drive amplitude of 2 V using the so-called heterodyne KPFM mode. This KPFM mode enables higher detection bandwidths with better signal-to-noise ratio and thereby faster measurements. 45 As electrostatic forces are long-ranged, the resolution of the standard amplitude modulated (AM) KPFM is prone to crosstalk from adjacent structures with different surface potentials. 46 In comparison, FM KPFM offers quantitative surface potential measurements with a lateral resolution of 10-50 nm.
To completely decouple the measurement of the charging dynamics from the scanning motion, we implemented timeresolved KPFM (tr-KPFM), where the local CPD response to a light-or a voltage pulse is recorded subsequently at each position of a predefined grid across the cross section. In particular, the tip was approached until the amplitude decreased to a setpoint of 87% of the free amplitude of 21.4 nm. During this ''surface dwell'', the vertical position was regulated by a feedback to keep the amplitude constant (''tapping mode''). From the simultaneously recorded z-position of the tip and the phase lag of the cantilever oscillation, a map of average height (ESI †) and average phase can be calculated (Fig. 2b). The CPD value recorded in the first 100 ms before the voltage pulse represents the static CPD, i.e. the CPD at an equilibrium ion distribution (Fig. 2c). The topography and static CPD distribution as obtained from tr-KPFM is identical to conventional KPFM mapping (Fig. S2, ESI †), demonstrating that both methods provide the same information.
For the present study, the time resolution was limited by the sampling rate of the SFM controller (2 kHz). Using better sampling and more sophisticated KPFM methods, the temporal resolution can be easily extended into the ms-range. 29,47 Interpretation of tr-KPFM maps To translate the potential distribution U(x) into a charge carrier distribution, r(x), we can use the 1D-Poisson equation (ee 0 is the dielectric constant of the perovskite): Essentially, the Poisson equation states that a concave CPD curve corresponds to negative and a convex CPD curve corresponds to positive charge density. The corresponding positive and negative space charge regions are marked in red and blue, respectively, in the DCPD maps throughout this paper.

Conflicts of interest
There are no conflicts to declare.