A conventional 2 inch planar, circular magnetron has been designed allowing an in situ variation of the magnetic field configuration, i.e. the distance of the peripheral magnet ring and central magnet cylinder to the target could be varied independently from each other. The development of this kind of magnetron allows us to investigate the influence of the strength and shape of the magnetic field on the growth of TiN films. Such TiN films were deposited on grounded stainless steel substrates by sputtering a pure Ti target in a mixture of Ar and N2. The influence of the N2 flow and the magnetic field configuration on the crystallographic orientation of the deposited films has been investigated. At similar conditions, the influence of the magnetic field configuration and N2 flow on the discharge voltage, deposition rate and the ion flux towards the substrate has been investigated. No clear relationship between the ion-to-atom ratio and the crystallographic orientation has been observed.