Preparation and characterization of TiN films by electron cyclotron resonance (ECR) sputtering for diffusion barrier applications