TiN films of 50 nm and 500 nm thickness were deposited on M2 tool steel substrates by reactive closed field unbalanced magnetron sputtering operating in direct current (DC) and pulsed magnetron sputtering (PMS) modes. Parameters of the crystallographic structure and surface roughness and their evolution during the films growth were analyzed via X-ray diffraction and atomic force microscopy. The obtained results show that all the analyzed films have polycrystalline and mono-phase (TiN) structures. In the 50 nm films, the in plane crystallographic texture that formed was 100%{111}. During film growth a weakening of the preferred crystallographic orientation and a decrease of the concentration of lattice imperfections occurred. Both processes are more pronounced in the film deposited by PMS compared to that deposited by DC sputtering. Film growth is accompanied by increasing of surface smoothness. Pulsing the target power led to a decrease of the mean surface roughness of both the 50 nm and 500 nm films.