The generation and behaviour of superthermal electrons are studied as a function of magnetic configuration in the TJ-IU torsatron. Characterization of fast electrons is carried out with soft x-ray (SXR) and hard x-ray (HXR) diagnostic systems, covering the range from 0.4 keV to several MeV. The mean energies reached by the superthermal electron populations are found to be consistent with the occurrence of electron cyclotron (EC) off-axis absorption for the different radial magnetic field ripples at the axis. The interpretation of the experimental observations has been based on the influence of trapping factors at the magnetic axis and electron density profiles in the superthermal electron mean energy and density.