TS101 (#1695)
* Refactor I2C_SOFT to new #define * Stitch in some of TS101 Update ShowStartupWarnings.cpp Update OLED.hpp Update stm32f1xx_hal_msp.c Update Setup.cpp Update Power.cpp Update Pins.h Update configuration.h Power Muxing Working dual input Voltage handler Scan mode required for differing injected channels Inject both dc readings Update configuration.h Update configuration.h Use htim4 for adc control on TS101 Refactor htim names Add ADC_TRIGGER Speed up BB I2C a lil Update configuration.h Update startup_stm32f103t8ux.S Update configuration.h Add LIS2DH clone LIS2DH gains another clone Create tooling to allow mapping accelerometers onto different buses Update startup_stm32f103t8ux.S Ensure PD IRQ is pulled up * Stitch in some of TS101 Update ShowStartupWarnings.cpp Update OLED.hpp Update stm32f1xx_hal_msp.c Update Setup.cpp Update Power.cpp Update Pins.h Update configuration.h Power Muxing Working dual input Voltage handler Scan mode required for differing injected channels Inject both dc readings Update configuration.h Update configuration.h Use htim4 for adc control on TS101 Refactor htim names Add ADC_TRIGGER Speed up BB I2C a lil Update configuration.h Update startup_stm32f103t8ux.S Update configuration.h Add LIS2DH clone LIS2DH gains another clone Create tooling to allow mapping accelerometers onto different buses Update startup_stm32f103t8ux.S Ensure PD IRQ is pulled up Allow toggle which button enters PD debug * Update Pins.h * Fix hard coded IRQ Pin Update stm32f1xx_it.c * Enable EPR * Tip resistance measurement * TS101 is a direct drive tip Update BSP.cpp * Add S60 and TS101 to builds Update push.yml * Update MOVThread.cpp * Refactor power menu handler * Correct prescaler Forgot to update since I changed the period * Tune in the timer divider for tip control to make PWM less audible --------- Co-authored-by: discip <53649486+discip@users.noreply.github.com>
This commit is contained in:
@@ -130,9 +130,9 @@
|
||||
// Vin_max = (3.3*(r1+r2))/(r2)
|
||||
// vdiv = (32768*4)/(vin_max*10)
|
||||
|
||||
#if defined(MODEL_TS100) + defined(MODEL_TS80) + defined(MODEL_TS80P) > 1
|
||||
#if defined(MODEL_TS100) + defined(MODEL_TS80) + defined(MODEL_TS80P) + defined(MODEL_TS101) > 1
|
||||
#error "Multiple models defined!"
|
||||
#elif defined(MODEL_TS100) + defined(MODEL_TS80) + defined(MODEL_TS80P) == 0
|
||||
#elif defined(MODEL_TS100) + defined(MODEL_TS80) + defined(MODEL_TS80P) + defined(MODEL_TS101) == 0
|
||||
#error "No model defined!"
|
||||
#endif
|
||||
#define NEEDS_VBUS_PROBE 0
|
||||
@@ -174,6 +174,39 @@
|
||||
#define TEMP_TMP36
|
||||
#endif
|
||||
|
||||
#ifdef MODEL_TS101
|
||||
#define VOLTAGE_DIV 700 // 700 - Default divider from schematic
|
||||
#define CALIBRATION_OFFSET 900 // 900 - Default adc offset in uV
|
||||
#define PID_POWER_LIMIT 100 // Sets the max pwm power limit
|
||||
#define POWER_LIMIT 0 // 0 watts default limit
|
||||
#define MAX_POWER_LIMIT 100
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_TS100
|
||||
#define TEMP_uV_LOOKUP_HAKKO
|
||||
|
||||
#define HARDWARE_MAX_WATTAGE_X10 1000
|
||||
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
|
||||
#define TIP_RESISTANCE 75 // x10 ohms, 7.5 typical for ts100 tips
|
||||
|
||||
#define TIP_HAS_DIRECT_PWM 1
|
||||
#define POW_DC 1
|
||||
#define POW_PD 1
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define I2C_SOFT_BUS_1 1
|
||||
#define OLED_I2CBB1 1
|
||||
#define USB_PD_I2CBB2 1
|
||||
#define USB_PD_VMAX 28 // Device supposedly can do 28V; looks like vmax is 33 ish
|
||||
#define OLED_128x32 1
|
||||
#define OLED_FLIP 1
|
||||
#define HAS_SPLIT_POWER_PATH 1
|
||||
#define TEMP_NTC 1
|
||||
#define ACCEL_I2CBB1 1
|
||||
#define POW_EPR 1
|
||||
#define HAS_POWER_DEBUG_MENU
|
||||
#define DEBUG_POWER_MENU_BUTTON_B
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0
|
||||
#define MAX_POWER_LIMIT 40
|
||||
#define POWER_LIMIT_STEPS 2
|
||||
@@ -212,10 +245,20 @@
|
||||
#define POW_PD 1
|
||||
#define POW_QC 1
|
||||
#define TEMP_NTC
|
||||
#define I2C_SOFT
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define SC7_ORI_FLIP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODEL_TS101
|
||||
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
|
||||
|
||||
#else
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
#endif
|
||||
|
||||
#ifdef MODEL_TS101
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
|
||||
#else
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
#endif
|
||||
Reference in New Issue
Block a user