  We present precise photospheric parameters of 282 M dwarfs determined from
fitting the most recent version of PHOENIX models to high-resolution CARMENES
spectra in the visible (0.52 - 0.96 $\mu$m) and near-infrared wavelength range
(0.96 - 1.71 $\mu$m). With its aim to search for habitable planets around M
dwarfs, several planets of different masses have been detected. The
characterization of the target sample is important for the ability to derive
and constrain the physical properties of any planetary systems that are
detected. As a continuation of previous work in this context, we derived the
fundamental stellar parameters effective temperature, surface gravity, and
metallicity of the CARMENES M-dwarf targets from PHOENIX model fits using a
$\chi^2$ method. We calculated updated PHOENIX stellar atmosphere models that
include a new equation of state to especially account for spectral features of
low-temperature stellar atmospheres as well as new atomic and molecular line
lists. We show the importance of selecting magnetically insensitive lines for
fitting to avoid effects of stellar activity in the line profiles. For the
first time, we directly compare stellar parameters derived from multiwavelength
range spectra, simultaneously observed for the same star. In comparison with
literature values we show that fundamental parameters derived from visible
spectra and visible and near-infrared spectra combined are in better agreement
than those derived from the same spectra in the near-infrared alone.
