  In this work, we compare the photodetector performance of single defect-free
undoped and n-in GaN nanowires (NWs). In vacuum, undoped NWs present a
responsivity increment, nonlinearities and persistent photoconductivity effects
(~ 100 s). Their unpinned Fermi level at the m-plane NW sidewalls enhances the
surface states role in the photodetection dynamics. Air adsorbed oxygen
accelerates the carrier dynamics at the price of reducing the photoresponse. In
contrast, in n-i-n NWs, the Fermi level pinning at the contact regions limits
the photoinduced sweep of the surface band bending, and hence reduces the
environment sensitivity and prevents persistent effects even in vacuum.
