odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 49
odrv.config.dc_bus_undervoltage_trip_level = 10.5
odrv.config.dc_max_positive_current = 10
odrv.config.dc_max_negative_current = -0.01
odrv.config.brake_resistor0.enable = True
odrv.config.brake_resistor0.resistance = 2
odrv.axis0.config.motor.motor_type = MotorType.HIGH_CURRENT
odrv.axis0.config.motor.pole_pairs = 7
odrv.axis0.config.motor.torque_constant = 0.04135
odrv.axis0.config.motor.current_soft_max = 10
odrv.axis0.config.motor.current_hard_max = 23
odrv.axis0.config.motor.calibration_current = 5
odrv.axis0.config.motor.resistance_calib_max_voltage = 2
odrv.axis0.config.calibration_lockin.current = 10
odrv.axis0.motor.motor_thermistor.config.enabled = False
odrv.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.VEL_RAMP
odrv.axis0.controller.config.vel_limit = 10
odrv.axis0.controller.config.vel_limit_tolerance = 1.2
odrv.axis0.config.torque_soft_min = -1.1
odrv.axis0.config.torque_soft_max = 1.1
odrv.axis0.trap_traj.config.accel_limit = 10
odrv.axis0.controller.config.vel_ramp_rate = 10
odrv.can.config.protocol = Protocol.NONE
odrv.axis0.config.enable_watchdog = False
odrv.axis0.config.load_encoder = EncoderId.RS485_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.RS485_ENCODER0
odrv.rs485_encoder_group0.config.mode = Rs485EncoderMode.AMT21_EVENT_DRIVEN
odrv.config.enable_uart_a = True
odrv.config.gpio7_mode = GpioMode.UART_A
odrv.config.gpio6_mode = GpioMode.UART_A
odrv.config.uart_a_baudrate = 115200
This is my configuration.
I am using Arduino Mega 2560 and trying to run the motor using Uart communication but my controller shows undefined states always. I also tried to pull the TX Pin to transmit data, but still my odrive is not found by the controller.
Give me some solution to overcome it