Electrostatic microinstabilities in ion internal barrier (ITB) and H-mode discharges of the ASDEX Upgrade tokamak [O. Gruber, R. Arslanbekov, C. Atanasiu , Nucl. Fusion 41, 1369 (2001)] have been investigated with a full radius gyrokinetic code. The code models linear stability and includes the effect of an equilibrium radial electric field and trapped electrons. In order to simulate plasmas in experimental conditions [k(perpendicular to)rho(L)similar toO(1)], the long wavelength approximation in the quasineutrality equation has been replaced by a Pade expansion of the modified Bessel function. Results show that the ExB flow, induced by the radial electric field, changes the linear stability of the dominant ion temperature gradient modes. The electrostatic potential eddies are tilted by the sheared flow thus reducing the radial extent and the growth rate of modes. However, the finite value of the flow has a stabilizing effect too; the most unstable modes are shifted away from the unfavorable curvature region leading to lower linear growth rates. In addition to this at least two other mechanisms give an important contribution to the stabilization in the ITB region; the reverse shear profile itself and, to a lesser degree, the local value of the temperature ratio, tau=T-e/T-i. (C) 2004 American Institute of Physics.