Compare commits

...

23 Commits

Author SHA1 Message Date
Tomás Rojas C
bccead5d0b Merge 24d7742df2 into 05158321ba 2025-02-24 15:41:09 -05:00
Ben V. Brown
05158321ba Merge pull request #2082 from Ralim/pinecil-v2-tip-disconnected
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_docs (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
Dont adjust pinecilv2 max temp by Coe
2025-02-23 09:04:57 +11:00
Ben V. Brown
f810921b0c Merge pull request #2083 from tabudz/fix-CVE-2021-31571
Some checks are pending
Docs / deploy-docs (push) Waiting to run
CI / build (MHP30) (push) Waiting to run
CI / build (Pinecil) (push) Waiting to run
CI / build (Pinecilv2) (push) Waiting to run
CI / build (S60) (push) Waiting to run
CI / check_docs (push) Waiting to run
CI / build (S60P) (push) Waiting to run
CI / build (T55) (push) Waiting to run
CI / build (TS100) (push) Waiting to run
CI / build (TS101) (push) Waiting to run
CI / build (TS80) (push) Waiting to run
CI / build (TS80P) (push) Waiting to run
CI / build_multi-lang (Pinecil) (push) Waiting to run
CI / build_multi-lang (Pinecilv2) (push) Waiting to run
CI / upload_metadata (push) Blocked by required conditions
CI / tests (push) Waiting to run
CI / check_c-cpp (push) Waiting to run
CI / check_python (push) Waiting to run
CI / check_shell (push) Waiting to run
Fix: Potential Vulnerability in Cloned Function
2025-02-22 18:55:43 +11:00
tabudz
2b8568ce37 add assert for addition overflow on queue creation (#225) 2025-02-22 15:46:12 +08:00
Ben V. Brown
d122a9fb52 Dont adjust pinecilv2 max temp by Coe 2025-02-22 15:19:43 +11:00
Ben V. Brown
57c8a35041 Merge pull request #2081 from Ralim/pd-sink-cap
Some checks are pending
Docs / deploy-docs (push) Waiting to run
CI / check_docs (push) Waiting to run
CI / build (MHP30) (push) Waiting to run
CI / build (Pinecil) (push) Waiting to run
CI / build (Pinecilv2) (push) Waiting to run
CI / build (S60) (push) Waiting to run
CI / build (S60P) (push) Waiting to run
CI / build (T55) (push) Waiting to run
CI / build (TS100) (push) Waiting to run
CI / build (TS101) (push) Waiting to run
CI / build (TS80) (push) Waiting to run
CI / build (TS80P) (push) Waiting to run
CI / build_multi-lang (Pinecil) (push) Waiting to run
CI / build_multi-lang (Pinecilv2) (push) Waiting to run
CI / upload_metadata (push) Blocked by required conditions
CI / tests (push) Waiting to run
CI / check_c-cpp (push) Waiting to run
CI / check_python (push) Waiting to run
CI / check_shell (push) Waiting to run
USB-PD: Add minimal sink caps
2025-02-22 11:38:53 +11:00
Ben V. Brown
3ed86d2acf sink caps: Add default profiles 2025-02-22 11:35:49 +11:00
Ben V. Brown
7c6ce812f6 Add minimal sink caps 2025-02-22 11:24:02 +11:00
Ivan Zorin
c92bf89296 Merge pull request #2075 from ia/debug-time
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_docs (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
Debug Menu: add time of compilation to timestamp build
2025-02-19 09:43:07 +03:00
Ivan Zorin
8a392b5364 Add the notice about EPR/PPS disabled by default in the main README.md (#2074)
* README.md: Supported Hardware - add notice about EPR/PPS disabled by default.
2025-02-19 17:42:55 +11:00
Ivan Zorin
68aac2847b Debug Menu: update documentation about timestamp format 2025-02-13 07:59:20 +03:00
Ivan Zorin
dc2b91c879 Debug Menu: add time of compilation to timestamp build 2025-02-13 07:49:22 +03:00
Ben V. Brown
24d7742df2 Set ADC input pins to INPUT mode instead of ANALOG 2024-11-14 21:01:55 +11:00
discip
3c54811937 Update Soldering.cpp 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
ba58d95adb removing thermal runaway 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
c3f6de189c adding working PID parameters to MHP30 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
2001093b14 returning to original parameters in Pinecil_V2 2024-11-14 20:59:20 +11:00
Tomás Rojas C
c336ec7773 Update source/Core/BSP/Pinecilv2/configuration.h
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-11-14 20:59:20 +11:00
Tomás Rojas C
c6705ac3c2 Update Makefile
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
896bbd0522 new PID parameters to compare with cloud compilation 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
52a57d4df5 settong P to 30 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
bcb08ad6cd setting I, D to zero, experimenting with just P 2024-11-14 20:59:20 +11:00
Tomás Rojas Castiglione
17ac550433 second attemp draft PR 2024-11-14 20:59:20 +11:00
10 changed files with 68 additions and 84 deletions

View File

@@ -40,9 +40,9 @@ I.e.:
**Additional scroll-able items appear in this order**:
### Date
### Timestamp
- This is a date of firmware compilation and it has the following format: `DD-MM-YY` (i.e., `01-07-23` means it has been built in July, 1st, 2023)
- This is a timestamp of firmware compilation and it has the following format: `YYYYMMDD HHMMSS` (i.e., `20230701 213456` means it has been built in July, 1st, 2023 at 9:34:56 pm)
### ID

View File

@@ -23,7 +23,7 @@ _This firmware does **NOT** support the USB port while running for changing sett
## Supported Hardware
| Device | DC | QC | PD | EPR | BLE | Tip Sense | Recommended Purchase | Notes |
| Device | DC | QC | PD | EPR\*\*\*\* | BLE | Tip Sense | Recommended Purchase | Notes |
| :------------: | :-: | :-: | :-: | :-: | :-: | :-------: | :------------------: | :-------------------------------------: |
| Miniware MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ✔️ | ✔️ | |
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ \* | |
@@ -48,6 +48,9 @@ The _TS101_ & _S60(P)_ irons and _MHP30_ & _T55_ plates feature a higher resolut
\*\*\* _TS80_ is replaced by _TS80P_. Production ramped down a long time ago and it's just existing stock clearing the system. It's marked not recommended being optimistic that people might pause and buy the far superior _TS80P_ instead. This is the main reason why the _TS80_ is **_no longer recommended_**.
\*\*\*\* **EPR/PPS with 28V support** is _**disabled by default**_ due to [safety concerns](https://github.com/Ralim/IronOS/pull/2073), but to turn it back on set
_PD Mode_ option in _Power settings_ submenu to _Safe_ or _Default_.
## Getting Started
To get started with _IronOS firmware_, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/).

View File

@@ -152,7 +152,7 @@ def get_constants() -> List[Tuple[str, str]]:
def get_debug_menu() -> List[str]:
return [
datetime.today().strftime("%Y-%m-%d"),
datetime.today().strftime("%Y%m%d %H%M%S"),
"ID ",
"ACC ",
"PWR ",

View File

@@ -165,6 +165,14 @@
#define ACCEL_EXITS_ON_MOVEMENT
#define NEEDS_VBUS_PROBE 0
#define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache
#define TIP_CONTROL_PID // We use PID rather than integrator
#define TIP_PID_KP 22 //40 // Reasonable compromise for most tips so far
#define TIP_PID_KI 300 //6 // About as high for stability across tips
#define TIP_PID_KD 600 //200 // Helps dampen smaller tips; ~= nothing for larger tips
#define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display
#define HARDWARE_MAX_WATTAGE_X10 650
#define TIP_THERMAL_MASS 65 // TODO, needs refinement
#define TIP_RESISTANCE 60 // x10 ohms, ~6 typical

View File

@@ -57,16 +57,16 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) {
PB1 ------> ADC2_IN9
*/
GPIO_InitStruct.Pin = TIP_TEMP_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TIP_TEMP_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = TMP36_INPUT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(TMP36_INPUT_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = VIN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(VIN_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = PLATE_SENSOR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
HAL_GPIO_Init(PLATE_SENSOR_GPIO_Port, &GPIO_InitStruct);
/* ADC2 interrupt Init */

View File

@@ -10,6 +10,7 @@
#include "TipThermoModel.h"
#include "USBPD.h"
#include "Utils.hpp"
#include "bflb_platform.h"
#include "bl702_adc.h"
#include "configuration.h"
#include "crc32.h"
@@ -282,16 +283,3 @@ void showBootLogo(void) {
BootLogo::handleShowingLogo(scratch);
}
TemperatureType_t getCustomTipMaxInC() {
// have to lookup the max temp while being aware of the coe scaling value
float max_reading = ADC_MAX_READING - 1.0;
if (adcGainCoeffCal.adcGainCoeffEnable) {
max_reading /= adcGainCoeffCal.coe;
}
TemperatureType_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(max_reading);
maximumTipTemp += getHandleTemperature(0) / 10; // Add handle offset
return maximumTipTemp - 1;
}

View File

@@ -161,7 +161,6 @@
#define OLED_96x16 1
#define TEMP_NTC
#define ACCEL_BMA
#define CUSTOM_MAX_TEMP_C 1 // Uses custom max temp lookup
#define ACCEL_SC7
#define HALL_SENSOR
#define HALL_SI7210

View File

@@ -337,68 +337,51 @@ bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) {
return true;
}
void add_v_record(pd_msg *cap, uint16_t voltage_mv, int numobj) {
uint16_t current = (voltage_mv) / getTipResistanceX10(); // In centi-amps
/* Add a PDO for the desired power. */
cap->obj[numobj] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage_mv)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
}
void pdbs_dpm_get_sink_capability(pd_msg *cap, const bool isPD3) {
/* Keep track of how many PDOs we've added */
// int numobj = 0;
int numobj = 0;
// /* If we have no configuration or want something other than 5 V, add a PDO
// * for vSafe5V */
// /* Minimum current, 5 V, and higher capability. */
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT);
/* If we have no configuration or want something other than 5 V, add a PDO
* for vSafe5V */
/* Minimum current, 5 V, and higher capability. */
cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT);
// Voltages must be in order of lowest -> highest
#if USB_PD_VMAX >= 20
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 15000, numobj);
numobj++;
add_v_record(cap, 20000, numobj);
numobj++;
#elif USB_PD_VMAX >= 15
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 12000, numobj);
numobj++;
add_v_record(cap, 15000, numobj);
numobj++;
#elif USB_PD_VMAX >= 12
add_v_record(cap, 9000, numobj);
numobj++;
add_v_record(cap, 12000, numobj);
numobj++;
#elif USB_PD_VMAX >= 9
add_v_record(cap, 9000, numobj);
numobj++;
#endif
// /* Get the current we want */
// uint16_t voltage = USB_PD_VMAX * 1000; // in mv
// if (requested_voltage_mv != 5000) {
// voltage = requested_voltage_mv;
// }
// uint16_t current = (voltage) / getTipResistanceX10(); // In centi-amps
/* Set the USB communications capable flag. */
cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS;
// /* Add a PDO for the desired power. */
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
// /* Get the PDO from the voltage range */
// int8_t i = dpm_get_range_fixed_pdo_index(cap);
// /* If it's vSafe5V, set our vSafe5V's current to what we want */
// if (i == 0) {
// cap->obj[0] &= ~PD_PDO_SNK_FIXED_CURRENT;
// cap->obj[0] |= PD_PDO_SNK_FIXED_CURRENT_SET(current);
// } else {
// /* If we want more than 5 V, set the Higher Capability flag */
// if (PD_MV2PDV(voltage) != PD_MV2PDV(5000)) {
// cap->obj[0] |= PD_PDO_SNK_FIXED_HIGHER_CAP;
// }
// /* If the range PDO is a different voltage than the preferred
// * voltage, add it to the array. */
// if (i > 0 && PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i]) != PD_MV2PDV(voltage)) {
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i])) | PD_PDO_SNK_FIXED_CURRENT_SET(PD_PDO_SRC_FIXED_CURRENT_GET(cap->obj[i]));
// }
// /* If we have three PDOs at this point, make sure the last two are
// * sorted by voltage. */
// if (numobj == 3 && (cap->obj[1] & PD_PDO_SNK_FIXED_VOLTAGE) > (cap->obj[2] & PD_PDO_SNK_FIXED_VOLTAGE)) {
// cap->obj[1] ^= cap->obj[2];
// cap->obj[2] ^= cap->obj[1];
// cap->obj[1] ^= cap->obj[2];
// }
// /* If we're using PD 3.0, add a PPS APDO for our desired voltage */
// if ((hdr_template & PD_HDR_SPECREV) >= PD_SPECREV_3_0) {
// cap->obj[numobj++]
// = PD_PDO_TYPE_AUGMENTED | PD_APDO_TYPE_PPS | PD_APDO_PPS_MAX_VOLTAGE_SET(PD_MV2PAV(voltage)) | PD_APDO_PPS_MIN_VOLTAGE_SET(PD_MV2PAV(voltage)) |
// PD_APDO_PPS_CURRENT_SET(PD_CA2PAI(current));
// }
// }
// /* Set the unconstrained power flag. */
// if (_unconstrained_power) {
// cap->obj[0] |= PD_PDO_SNK_FIXED_UNCONSTRAINED;
// }
// /* Set the USB communications capable flag. */
// cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS;
// /* Set the Sink_Capabilities message header */
// cap->hdr = hdr_template | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj);
/* Set the Sink_Capabilities message header */
cap->hdr = PD_DATAROLE_UFP | PD_SPECREV_3_0 | PD_POWERROLE_SINK | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj);
}
#endif

View File

@@ -161,11 +161,11 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) {
return OperatingMode::Sleeping;
}
if (heaterThermalRunaway) {
currentTempTargetDegC = 0; // heater control off
heaterThermalRunaway = false;
cxt->transitionMode = TransitionAnimation::Right;
return OperatingMode::ThermalRunaway;
}
// if (heaterThermalRunaway) {
// currentTempTargetDegC = 0; // heater control off
// heaterThermalRunaway = false;
// cxt->transitionMode = TransitionAnimation::Right;
// return OperatingMode::ThermalRunaway;
// }
return handleSolderingButtons(buttons, cxt);
}

View File

@@ -397,6 +397,9 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
/* Check for multiplication overflow. */
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
/* Check for addition overflow. */
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
/* Allocate the queue and storage area. Justification for MISRA
* deviation as follows: pvPortMalloc() always ensures returned memory
* blocks are aligned per the requirements of the MCU stack. In this case