Motor stop spinning with no error

Hi, i’m making a electric longboard, but i am having a problema with velocity control, in my microcontroller i made a ramp function and communicate with uart, the thing is when a ride a little bit the motor slowly loose torque and the stop and the wires keep running current at a point that heats a little bit, the bus current indicate 1,4 amp aprox. and im using a 36v battery with keda 6364 motor with 3.5v 48v odrive.
this are the parameters. i dont have any idea what its going on. if anyone can help me, its for university project.
In [1]: odrv0.axis0
Out[1]:
error = 0x0000 (int)
step_dir_active = False (bool)
current_state = 8 (int)
requested_state = 0 (int)
loop_counter = 3659739 (int)
config:
startup_motor_calibration = False (bool)
startup_encoder_index_search = False (bool)
startup_encoder_offset_calibration = False (bool)
startup_closed_loop_control = False (bool)
startup_sensorless_control = False (bool)
enable_step_dir = False (bool)
counts_per_step = 2.0 (float)
step_gpio_pin = 1 (int)
dir_gpio_pin = 2 (int)
ramp_up_time = 0.4000000059604645 (float)
ramp_up_distance = 12.566370964050293 (float)
spin_up_current = 10.0 (float)
spin_up_acceleration = 400.0 (float)
spin_up_target_vel = 400.0 (float)
get_temp()
motor:
error = 0x0000 (int)
armed_state = 3 (int)
is_calibrated = True (bool)
current_meas_phB = -7.38580846786499 (float)
current_meas_phC = 4.618022918701172 (float)
DC_calib_phB = -1.476582646369934 (float)
DC_calib_phC = -0.9522831439971924 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
current_control: …
gate_driver: …
timing_log: …
config: …
controller:
error = 0x0000 (int)
pos_setpoint = 256.75 (float)
vel_setpoint = 0.0 (float)
vel_integrator_current = 7.456581115722656 (float)
current_setpoint = 0.0 (float)
vel_ramp_target = 0.0 (float)
vel_ramp_enable = False (bool)
config: …
set_pos_setpoint(pos_setpoint: float, vel_feed_forward: float, current_feed_forward: float)
set_vel_setpoint(vel_setpoint: float, current_feed_forward: float)
set_current_setpoint(current_setpoint: float)
move_to_pos(goal_point: float)
start_anticogging_calibration()
encoder:
error = 0x0000 (int)
is_ready = True (bool)
index_found = False (bool)
shadow_count = 4877527 (int)
count_in_cpr = 3287 (int)
interpolation = 0.0781249850988388 (float)
phase = -2.7801098823547363 (float)
pos_estimate = 4877528.0 (float)
pos_cpr = 3287.002197265625 (float)
hall_state = 7 (int)
vel_estimate = -125.0000228881836 (float)
config: …
sensorless_estimator:
error = 0x0000 (int)
phase = -1.08993661403656 (float)
pll_pos = -1.0888028144836426 (float)
vel_estimate = -0.296542227268219 (float)
config: …
trap_traj:
config: …

In [2]: odrv0.axis0.motor
Out[2]:
error = 0x0000 (int)
armed_state = 3 (int)
is_calibrated = True (bool)
current_meas_phB = -7.631777763366699 (float)
current_meas_phC = 4.865957736968994 (float)
DC_calib_phB = -1.4722278118133545 (float)
DC_calib_phC = -0.9586291909217834 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
current_control:
p_gain = 0.021524053066968918 (float)
i_gain = 36.88251495361328 (float)
v_current_control_integral_d = -0.010028045624494553 (float)
v_current_control_integral_q = 0.3678571581840515 (float)
Ibus = 0.1093713641166687 (float)
final_v_alpha = 0.13858561217784882 (float)
final_v_beta = -0.33985236287117004 (float)
Iq_setpoint = 7.499627590179443 (float)
Iq_measured = 7.510277271270752 (float)
max_allowed_current = 60.75 (float)
overcurrent_trip_level = 67.5 (float)
gate_driver:
drv_fault = 0 (int)
timing_log:
TIMING_LOG_GENERAL = 0 (int)
TIMING_LOG_ADC_CB_I = 2670 (int)
TIMING_LOG_ADC_CB_DC = 12886 (int)
TIMING_LOG_MEAS_R = 7914 (int)
TIMING_LOG_MEAS_L = 7326 (int)
TIMING_LOG_ENC_CALIB = 8230 (int)
TIMING_LOG_IDX_SEARCH = 0 (int)
TIMING_LOG_FOC_VOLTAGE = 8178 (int)
TIMING_LOG_FOC_CURRENT = 7890 (int)
config:
pre_calibrated = False (bool)
pole_pairs = 7 (int)
calibration_current = 15.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 2.1524052499444224e-05 (float)
phase_resistance = 0.036882515996694565 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 50.0 (float)
requested_current_range = 60.0 (float)
current_control_bandwidth = 1000.0 (float)

This is a video of the error.

im talking alone here lol, but i resolve the problem, if any one have the same problem it could be that the encoder has some friction and heats up and stop working.

Yep your encoder is missing steps and the motor eventually stops commutating. For electric longboard in speed control mode you should probably be using hall effect sensors not an encoder, or at the very least use a non-contact encoder like an AS5047.