fix(esp32): skip RTC timer wake on user shutdown; TAP V2 OCV and partition (#10739)
* fix(esp32): skip RTC timer wake on user shutdown Do not arm esp_sleep_enable_timer_wakeup when msecToWake is portMAX_DELAY (UI shutdown), matching nRF52 system_off semantics. fix(rak_wismesh_tap_v2): Tag OCV curve and 16MB partition Add OCV_ARRAY matching WisMesh Tag for accurate SOC. Use 16MB flash partition scheme for TAP V2 hardware. Co-authored-by: Cursor <cursoragent@cursor.com> * Trunkt --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
co-authored by
GitHub
Cursor
Ben Meadors
parent
4f0e2dde98
commit
9358b2c549
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
#include "esp_mac.h"
|
||||
#include "freertosinc.h"
|
||||
#include "meshUtils.h"
|
||||
#include "sleep.h"
|
||||
#include "soc/rtc.h"
|
||||
@@ -276,6 +277,8 @@ void cpuDeepSleep(uint32_t msecToWake)
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||
#endif
|
||||
|
||||
esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs
|
||||
esp_deep_sleep_start(); // TBD mA sleep current (battery)
|
||||
// User shutdown (DELAY_FOREVER / portMAX_DELAY): no RTC timer — align with nRF52 system_off semantics.
|
||||
if (msecToWake != portMAX_DELAY)
|
||||
esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ custom_meshtastic_support_level = 1
|
||||
custom_meshtastic_display_name = RAK WisMesh Tap V2
|
||||
custom_meshtastic_images = rak-wismesh-tap-v2.svg
|
||||
custom_meshtastic_tags = RAK
|
||||
custom_meshtastic_partition_scheme = 8MB
|
||||
custom_meshtastic_partition_scheme = 16MB
|
||||
custom_meshtastic_has_mui = true
|
||||
|
||||
extends = esp32s3_base
|
||||
board = wiscore_rak3312
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
board_build.partitions = default_8MB.csv
|
||||
board_build.partitions = default_16MB.csv
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#define BATTERY_PIN 1
|
||||
#define ADC_CHANNEL ADC_CHANNEL_0
|
||||
#define ADC_MULTIPLIER 1.667
|
||||
#define OCV_ARRAY 4160, 4020, 3940, 3870, 3810, 3760, 3740, 3720, 3680, 3620, 2990
|
||||
|
||||
#define PIN_BUZZER 38
|
||||
|
||||
|
||||
Reference in New Issue
Block a user