  Radio continuum emission from galaxies at gigahertz frequencies can be used
as an extinction-free tracer of star formation. However, at frequencies of a
few hundred megahertz, there is evidence for low-frequency spectral flattening.
We wish to better understand the origin of this low-frequency flattening and,
to this end, perform a spatially resolved study of the nearby spiral galaxy M
51. We explore the different effects that can cause flattening of the spectrum
towards lower frequencies, such as free-free absorption and cosmic-ray
ionisation losses. We used radio continuum intensity maps between 54 and 8350
MHz at eight different frequencies, with observations at 240 MHz from the Giant
Metrewave Radio Telescope presented for the first time. We corrected for
contribution from thermal free-free emission using an H$\alpha$ map that has
been extinction-corrected with 24 $\mu$m data. We fitted free-free absorption
models to the radio spectra to determine the emission measure (EM) as well as
polynomial functions to measure the non-thermal spectral curvature. The
non-thermal low-frequency radio continuum spectrum between 54 and 144 MHz is
very flat and even partially inverted, particularly in the spiral arms;
contrary, the spectrum at higher frequencies shows the typical non-thermal
radio continuum spectrum. However, we do not find any correlation between the
EMs calculated from radio and from H$\alpha$ observations; instead, the
non-thermal spectral curvature weakly correlates with the HI gas mass surface
density. This suggests that cosmic-ray ionisation losses play an important role
in the low-frequency spectral flattening. The observed spectral flattening
towards low frequencies in M 51 is caused by a combination of ionisation losses
and free-free absorption. The reasons for this flattening need to be understood
in order to use sub-GHz frequencies as a star-formation tracer.
