Fixing up ADC config
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODEL_MHP30
|
#ifdef MODEL_MHP30
|
||||||
#define ACCEL_LIS
|
|
||||||
#define ACCEL_MSA
|
#define ACCEL_MSA
|
||||||
#define POW_PD
|
#define POW_PD
|
||||||
//#define POW_QC // Unsure if we have this
|
//#define POW_QC // Unsure if we have this
|
||||||
|
|||||||
@@ -177,8 +177,8 @@ static void MX_ADC2_Init(void) {
|
|||||||
sConfig.Rank = ADC_REGULAR_RANK_2;
|
sConfig.Rank = ADC_REGULAR_RANK_2;
|
||||||
HAL_ADC_ConfigChannel(&hadc2, &sConfig);
|
HAL_ADC_ConfigChannel(&hadc2, &sConfig);
|
||||||
sConfig.Channel = TIP_TEMP_ADC1_CHANNEL;
|
sConfig.Channel = TIP_TEMP_ADC1_CHANNEL;
|
||||||
sConfig.Rank = ADC_REGULAR_RANK_2;
|
sConfig.Rank = ADC_REGULAR_RANK_3;
|
||||||
HAL_ADC_ConfigChannel(&hadc1, &sConfig);
|
HAL_ADC_ConfigChannel(&hadc2, &sConfig);
|
||||||
|
|
||||||
// Run ADC internal calibration
|
// Run ADC internal calibration
|
||||||
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK)
|
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "MSA301_defines.h"
|
#include "MSA301_defines.h"
|
||||||
#include <MSA301.h>
|
#include <MSA301.h>
|
||||||
#define MSA301_I2C_ADDRESS 0x4C
|
#define MSA301_I2C_ADDRESS 0x26<<1
|
||||||
bool MSA301::detect() { return FRToSI2C::probe(MSA301_I2C_ADDRESS); }
|
bool MSA301::detect() { return FRToSI2C::probe(MSA301_I2C_ADDRESS); }
|
||||||
|
|
||||||
static const FRToSI2C::I2C_REG i2c_registers[] = {
|
static const FRToSI2C::I2C_REG i2c_registers[] = {
|
||||||
|
|||||||
@@ -164,11 +164,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODEL_MHP30
|
#ifdef MODEL_MHP30
|
||||||
#define VOLTAGE_DIV 650 // Default for MHP30 TODO
|
#define VOLTAGE_DIV 350 // Default for MHP30
|
||||||
#define PID_POWER_LIMIT 75 // Sets the max pwm power limit
|
#define PID_POWER_LIMIT 65 // Sets the max pwm power limit
|
||||||
#define CALIBRATION_OFFSET 900 // the adc offset in uV
|
#define CALIBRATION_OFFSET 900 // the adc offset in uV
|
||||||
#define POWER_LIMIT 65 // 65 watts default power limit
|
#define POWER_LIMIT 65 // 65 watts default power limit
|
||||||
#define MAX_POWER_LIMIT 35 //
|
#define MAX_POWER_LIMIT 65 //
|
||||||
#define POWER_LIMIT_STEPS 2 //
|
#define POWER_LIMIT_STEPS 2 //
|
||||||
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_TS100 // TODO
|
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_TS100 // TODO
|
||||||
#define TEMP_uV_LOOKUP_MHP30 // TODO
|
#define TEMP_uV_LOOKUP_MHP30 // TODO
|
||||||
@@ -196,6 +196,6 @@ const uint8_t tipResistance = 45; // x10 ohms, 4.5 typical for ts80 tips
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODEL_MHP30
|
#ifdef MODEL_MHP30
|
||||||
const uint32_t tipMass = 80; // TODO
|
const uint32_t tipMass = 100; // TODO
|
||||||
const uint8_t tipResistance = 65; // x10 ohms, 6 typical
|
const uint8_t tipResistance = 75; // x10 ohms, ~6 typical
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user