iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.18k stars 1.48k forks source link

DSHOT not functional on Matek F722 #4126

Closed DzikuVx closed 5 years ago

DzikuVx commented 5 years ago

Enabling by USE_DSHOT in development 40f68610687a8ab0a944e78de8288cd38a0ce2c5 on Matek F722, compilint, and then setting it up breaks multiple FC functionalities:

  1. Beeper goes on and off all the time
  2. VBAT monitoring is broken
  3. Current monitoring broken
  4. LEDs broken
  5. ARM possible but only motor 1 is spining
  6. ESC enter calibration from time to time
# diff

# version
# INAV/MATEKF722 2.1.0 Dec 27 2018 / 11:57:59 (40f6861)
# GCC-7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

# resources

# mixer
mmix 0  1.000 -1.000  1.000 -1.000
mmix 1  1.000 -1.000 -1.000  1.000
mmix 2  1.000  1.000  1.000  1.000
mmix 3  1.000  1.000 -1.000 -1.000

# servo mix

# servo

# feature
feature -TX_PROF_SEL
feature GPS
feature RSSI_ADC
feature LED_STRIP
feature BLACKBOX
feature AIRMODE
feature PWM_OUTPUT_ENABLE

# serial
serial 20 1 115200 38400 0 115200
serial 0 1 115200 38400 0 115200
serial 1 64 115200 38400 0 115200
serial 2 32 115200 38400 0 115200
serial 3 2 115200 115200 0 115200
serial 4 4096 115200 38400 0 115200

# master
set looptime = 500
set gyro_hardware_lpf = 256HZ
set gyro_lpf_hz = 80
set gyro_stage2_lowpass_hz = 130
set acc_hardware = MPU6500
set acczero_x = -13
set acczero_y = 3
set acczero_z = -20
set accgain_x = 4085
set accgain_y = 4089
set accgain_z = 4081
set align_mag = CW270FLIP
set mag_hardware = HMC5883
set mag_declination = 350
set magzero_x = 36
set magzero_y = -154
set magzero_z = 48
set baro_hardware = BMP280
set pitot_hardware = NONE
set blackbox_rate_denom = 4
set min_throttle = 1075
set motor_pwm_rate = 4000
set motor_pwm_protocol = DSHOT150
set failsafe_procedure = RTH
set current_meter_scale = 179
set current_meter_offset = 50
set model_preview_type = 3
set gps_provider = UBLOX7
set gps_sbas_mode = AUTO
set gps_ublox_use_galileo = ON
set inav_w_z_baro_p =  0.350
set nav_extra_arming_safety = OFF
set nav_user_control_mode = CRUISE
set nav_auto_speed = 700
set nav_manual_speed = 1000
set nav_manual_climb_rate = 300
set nav_rth_altitude = 1500
set i2c_speed = 200KHZ
set debug_mode = GYRO
set vtx_band = 5
set vtx_power = 4
set vtx_freq = 5658
DzikuVx commented 5 years ago

After further investigation, when DSHOT is enabled, LED is interfering with BEEPER. Disabling LED solves BEEPER but still only S1 output is functional.

digitalentity commented 5 years ago

Blocks #4111

DzikuVx commented 5 years ago

Setting

DEF_TIM(TIM3, CH1, PC6, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0),   // S1 DMA1_ST4
    DEF_TIM(TIM8, CH2, PC7, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0),   // S2 DMA2_ST3
    DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0),   // S3 DMA2_ST2
    DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0),   // S4 DMA2_ST7

causes board to not boot after DSHOT protocol is selected