Let the self-affine measure μM,D be generated by an expanding matrix M=diag(ρ−11,ρ−12,…,ρ−1n)∈Mn(ℝ) and a finite integer digit set D=B˜D, where B∈Mn(ℤ) with det(B)≠0 and ˜D⊂ℤn. In this paper, we show that if {x∈[0,1)n:∑˜d∈˜De2πi<˜d,x>=0}={1s(s1,s2,…,sn)t:0≤s1,…,sn≤s−1}∖{0} for an integer s≥2, then L2(μM,D) admits an infinite orthogonal set of exponential functions if and only if there exists ρi(1≤i≤n) such that |ρi|=(qi/pi)1/ri for some pi,qi,ri∈ℕ with gcd(pi,qi)=1 and gcd(pi,s)>1.