We study minimal and nonminimal couplings of fermions to the Palatini action
in $n$ dimensions ($n\geq 3$) from the Lagrangian and Hamiltonian viewpoints.
The Lagrangian action considered is not, in general, equivalent to the
Einstein-Dirac action principle. However, by choosing properly the coupling
parameters, it is possible to give a first-order action fully equivalent to the
Einstein-Dirac theory in a spacetime of dimension four. By using a suitable
parametrization of the vielbein and the connection, the Hamiltonian analysis of
the general Lagrangian is given, which involves manifestly Lorentz-covariant
phase-space variables, a real noncanonical symplectic structure, and only
first-class constraints. Additional Hamiltonian formulations are obtained via
symplectomorphisms, one of them involving half-densitized fermions. To confront
our results with previous approaches, the time gauge is imposed.