We study $p$-adic multiresolution analyses (MRAs). A complete characterisation of test functions generating a MRA (scaling functions) is given. We prove that only 1-periodic test functions may be taken as orthogonal scaling functions and that all such scaling functions generate Haar MRA. We also suggest a method of constructing sets of wavelet functions and prove that any set of wavelet functions generates a $p$-adic wavelet frame.