Rare earth doping of porous silicon is a very promising technique for the fabrication of all-Si light emitting devices at the 1.5μm wavelength. However, the lack of detailed knowledge of the mechanisms underlying the electrochemical Er doping (ECD) of the porous layers has, till now, been a major limitation for achieving the expected performances. As we will show, a key parameter of the Er ECD is the current density used during the process. We observed that using low current densities (LD), for equal amounts of transferred charge, leads to a significantly lower Er content in the porous layers with respect to using high current densities (HD). The threshold between "high" and "low" current densities depends on the sample characteristics, being related to the effective surface of the sample. The samples have been characterized by galvanostatic electrochemical impedance spectroscopy (GEIS) for various DC current densities. The GEIS results show a significant difference for LD and HD, and an additional semicircle in the Nyquist plot is visible for HD with respect to LD. This change in the ECD behavior is also observed when studying the applied voltage time evolution in constant-current ECD. With LD, a single transient is observed, while for HD a double transient ? is observed, coherently with the appearance of an additional semicircle in the GEIS plots. Energy Dispersive Spectroscopy by Scanning Electron Microscopy (EDS-SEM) confirmed the significant difference in the Er content for LD and HD samples with equal total transferred charge, HD samples containing more than one order of magnitude additional Er atoms with respect to LD samples