hwdef.dat 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # hw definition file for processing by chibios_hwdef.py
  2. # for The CUBE Black and the Cube Purple hardware
  3. # this is based on fmuv3, but with vendor specific USB IDs
  4. include ../fmuv3/hwdef.dat
  5. define HAL_CHIBIOS_ARCH_CUBEBLACK 1
  6. env OPTIMIZE -O2
  7. # USB setup
  8. USB_VENDOR 0x2DAE # ONLY FOR USE BY HEX! NOBODY ELSE
  9. USB_PRODUCT 0x1011
  10. USB_STRING_MANUFACTURER "Hex/ProfiCNC"
  11. USB_STRING_PRODUCT "CubeBlack"
  12. USB_STRING_SERIAL "%SERIAL%"
  13. # remap PB0/1 as ADC's
  14. undef PB0
  15. undef PB1
  16. PB0 PB0_ADC ADC1 SCALE(1)
  17. PB1 PB1_ADC ADC1 SCALE(1)
  18. SPIDEV icm20948_ext SPI4 DEVID1 MPU_EXT_CS MODE3 4*MHZ 8*MHZ
  19. SPIDEV icm20602_ext SPI4 DEVID3 GYRO_EXT_CS MODE3 4*MHZ 8*MHZ
  20. # three IMUs, but allow for different varients. First two IMUs are
  21. # isolated, 3rd isn't
  22. IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180
  23. # the 3 rotations for the LSM9DS0 driver are for the accel, the gyro
  24. # and the H varient of the gyro
  25. IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90
  26. # 3rd non-isolated IMU
  27. IMU Invensense SPI:mpu9250 ROTATION_YAW_270
  28. # alternative IMU set for newer cubes
  29. IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270
  30. IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180
  31. IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270
  32. define HAL_DEFAULT_INS_FAST_SAMPLE 5
  33. # two baros
  34. BARO MS56XX SPI:ms5611_ext
  35. BARO MS56XX SPI:ms5611
  36. # two compasses. First is in the LSM303D
  37. COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270
  38. # 2nd compass is part of the 2nd invensense IMU
  39. COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270
  40. # compass as part of ICM20948 on newer cubes
  41. COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90
  42. # also probe for external compasses
  43. define HAL_PROBE_EXTERNAL_I2C_COMPASSES
  44. # This defines an output pin which will default to output HIGH. It is
  45. # a pin that enables peripheral power on this board. It starts in the
  46. # off state, then is pulled low to enable peripherals in
  47. # peripheral_power_enable()
  48. undef PA8
  49. PA8 nVDD_5V_PERIPH_EN OUTPUT HIGH
  50. # This is the pin to enable the sensors rail. It can be used to power
  51. # cycle sensors to recover them in case there are problems with power on
  52. # timing affecting sensor stability. We pull it LOW on startup, which
  53. # means sensors off, then it is pulled HIGH in peripheral_power_enable()
  54. undef PE3
  55. PE3 VDD_3V3_SENSORS_EN OUTPUT LOW