CMOS pixel sensors, originally developed for High Energy Physics experiments, are also used for space radiation research and medical applications, providing high resolution particle trajectories, for e.g., cross section measurements. In the present work, the response of the CMOS pixel sensor MIMOSA-28 was investigated for a variety of ion beams and energies. Several experiments were performed at different particle accelerators to study the number of pixels triggered by an incoming particle as a function of the energy loss in the range 10-14000 keV. Measurements were performed for ion beams relevant for clinical applications such as protons and carbon ions, but also for heavier particles like iron ions relevant for space radiation research in the energy range 10 MeV/u - 1 GeV/u. In addition, the spatial energy loss distributions of several ion beams were computed with Monte Carlo simulations and a semi-empirical model, based on thermal diffusion and Coulomb expansion, was developed to reproduce the sensor response as a function of the energy loss. Furthermore, sensors were exposed to mixed radiation fields showed their capability as a suitable, additional tool to improve particle identification in conjunction with other detector systems. To enhance their particle identification capability further, new designs embed the digitization of the energy loss directly in pixels. Small prototypes have been designed by the TIIMM joint research activity and sent to fabrication recently.