Compare commits

..

12 Commits

Author SHA1 Message Date
Ben V. Brown
816b1b03a1 Merge c6f5fdd7be into 57c8a35041 2025-02-22 06:33:38 +00:00
Ben V. Brown
c6f5fdd7be Refactor I2C result to use notifications, allowing faster task yield
Some checks are pending
CI / build (MHP30) (push) Waiting to run
CI / tests (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 / check_c-cpp (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 / check_python (push) Waiting to run
CI / check_shell (push) Waiting to run
CI / check_docs (push) Waiting to run
So that one I2C done, task can directly swap and pickup later if I2C is blocking
2025-02-22 17:33:33 +11:00
Ben V. Brown
c888e8bba1 Add some PinecilV2 troubleshooing notes
Some checks are pending
CI / upload_metadata (push) Blocked by required conditions
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 / 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
CI / check_docs (push) Waiting to run
2025-02-22 15:04:49 +11:00
Ben V. Brown
6bc3811706 IRQ Read from FiFo 2025-02-22 14:56:24 +11:00
Ben V. Brown
aa1ac1f203 Ensure lock occurs once result captured 2025-02-22 14:53:45 +11:00
Ben V. Brown
4894451646 Add Rx FIFO status 2025-02-22 14:44:17 +11:00
Ben V. Brown
bef8233aa7 Use IRQ for all I2C Writes 2025-02-22 14:02:49 +11:00
Ben V. Brown
1095d1bc0a I2C inner function needs irq's 2025-02-22 13:32:00 +11:00
Ben V. Brown
5e8d44e07f [Squash] Move I2C to IRQ based for big txn
Squash DMA attempt out

.
2025-02-22 13:32:00 +11:00
Ben V. Brown
abefe96072 Use runaway counter trigger 2025-02-22 13:32:00 +11:00
Ben V. Brown
92730d1acb Use the ADC_MAX_READING value 2025-02-22 13:32:00 +11:00
Ben V. Brown
81da39e09f Update I2C_Wrapper.cpp 2025-02-22 13:31:59 +11:00
3 changed files with 14 additions and 4 deletions

View File

@@ -10,7 +10,6 @@
#include "TipThermoModel.h" #include "TipThermoModel.h"
#include "USBPD.h" #include "USBPD.h"
#include "Utils.hpp" #include "Utils.hpp"
#include "bflb_platform.h"
#include "bl702_adc.h" #include "bl702_adc.h"
#include "configuration.h" #include "configuration.h"
#include "crc32.h" #include "crc32.h"
@@ -283,3 +282,16 @@ void showBootLogo(void) {
BootLogo::handleShowingLogo(scratch); 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,6 +161,7 @@
#define OLED_96x16 1 #define OLED_96x16 1
#define TEMP_NTC #define TEMP_NTC
#define ACCEL_BMA #define ACCEL_BMA
#define CUSTOM_MAX_TEMP_C 1 // Uses custom max temp lookup
#define ACCEL_SC7 #define ACCEL_SC7
#define HALL_SENSOR #define HALL_SENSOR
#define HALL_SI7210 #define HALL_SI7210

View File

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