The associated codes of almost perfect nonlinear (APN) functions have been widely studied. In this paper we consider more generally the codes associated with functions that have differential uniformity at least 4. We emphasize, for such a function F , the role of codewords of weight 3 and 4 and of some cosets of its associated code C F. We give some properties on codes associated with differential uniformity exactly 4. We obtain lower bounds and upper bounds for the numbers of codewords of weight less than 5 of the codes C F. We show that the nonlinearity of F decreases when these numbers increase. We obtain a precise expression to compute these numbers when F is a plateaued or a differentially two-valued function. As an application, we propose a method to construct differentially 4-uniform functions with a large number of 2-to-1 derivatives from APN functions.