#include "hal_reboot.h"
#include "pinctrl_porting.h"
#include "pm_sleep.h"
+#include "pm_veto.h"
#include "pm_lpc.h"
#include "pm_control.h"
#include "dfx_system_init.h"
#include "cpu_load.h"
-#include "exception_dump.h"
#ifdef SUPPORT_AT_CMD
#include "at_cmd_api.h"
#if SUPPORT_LWIP
#include "lwip/tcpip.h"
#endif
-// #include "custom_save_runtime.h"
#define EMMC_BASE_ADDR 0x52062000
{ { "bt_sdk", 0, NULL, 0, NULL, BTH_SDK_STACK_SIZE, TASK_PRIORITY_SDK, 0, 0 },
(osThreadFunc_t)bt_acore_task_main, NULL, NULL, USE_DTCM_MEM },
#ifdef SUPPORT_AT_CMD
- { { "at_cmd", 0, NULL, 0, NULL, 0x1C00, TASK_PRIORITY_APP, 0, 0 },
+ { { "at_cmd", 0, NULL, 0, NULL, 0xC00, TASK_PRIORITY_APP, 0, 0 },
(osThreadFunc_t)at_cmd_task_process_handler, NULL,
- (CreateQueueFunction_t)at_cmd_task_queue_init, USE_EXTEND_MEM },
+ (CreateQueueFunction_t)at_cmd_task_queue_init, USE_DTCM_MEM },
#endif
#if defined(SUPPORT_AT_GRAPHIC)
{ { "at_graphic", 0, NULL, 0, NULL, AT_GRAPHIC_STACK_SIZE, TASK_PRIORITY_APP, 0, 0 },
#ifdef SUPPORT_AT_AUDIO
{ { "at_audio", 0, NULL, 0, NULL, AT_AUDIO_STACK_SIZE, TASK_PRIORITY_APP, 0, 0 },
(osThreadFunc_t)audio_at_task_process_handler, NULL,
- (CreateQueueFunction_t)audio_at_task_queue_init, USE_EXTEND_MEM },
+ (CreateQueueFunction_t)audio_at_task_queue_init, USE_DTCM_MEM },
#endif
#ifdef SUPPORT_AT_BT_MANAGER
{ { "at_bt_manager", 0, NULL, 0, NULL, AT_BT_MANAGER_STACK_SIZE, TASK_PRIORITY_APP, 0, 0 },
(osThreadFunc_t)bt_manager_task_process_handler, NULL,
- (CreateQueueFunction_t)bt_manager_at_task_queue_init, USE_EXTEND_MEM },
+ (CreateQueueFunction_t)bt_manager_at_task_queue_init, USE_DTCM_MEM },
#endif
#ifdef SUPPORT_AT_MEDIA
{ { "at_media", 0, NULL, 0, NULL, AT_MEDIA_STACK_SIZE, TASK_PRIORITY_APP, 0, 0 },
(osThreadFunc_t)media_at_task_process_handler, NULL,
- (CreateQueueFunction_t)media_at_task_queue_init, USE_EXTEND_MEM },
+ (CreateQueueFunction_t)media_at_task_queue_init, USE_DTCM_MEM },
#endif
#ifdef HSO_SUPPORT
{ { "dfx_msg", 0, NULL, 0, NULL, DFX_MSG_STACK_SIZE, TASK_PRIORITY_DFX_MSG, 0, 0 },
(osThreadFunc_t)transmit_process_thread, NULL,
(CreateQueueFunction_t)transmit_thread_msg_init, USE_DTCM_MEM },
#endif
-#if defined(SUPPORT_POWER_MANAGER) && !defined(SUPPORT_OHOSFWK)
+#if defined(SUPPORT_POWER_MANAGER) && !defined(SUPPORT_AT_OHOSFWK)
/* OHOS场景,pms不需要独立的队列和线程,事件由UI线程接管处理 */
{ { "power_display", 0, NULL, 0, NULL, PM_DISPLAY_MSG_STACK_SIZE, TASK_PRIORITY_TRANSMIT, 0, 0 },
(osThreadFunc_t)power_display_msg_thread, NULL,
(CreateQueueFunction_t)power_display_task_init, USE_DTCM_MEM },
#endif
{ { "save_file", 0, NULL, 0, NULL, SAVE_FILE_STACK_SIZE, TASK_PRIORITY_SAVE_FILE, 0, 0 },
- (osThreadFunc_t)save_file_main, NULL, NULL, USE_EXTEND_MEM },
+ (osThreadFunc_t)save_file_main, NULL, NULL, USE_DTCM_MEM },
#ifdef SUPPORT_AUTO_OTA
{ { "auto_ota", 0, NULL, 0, NULL, AUTO_OTA_STACK_SIZE, TASK_PRIORITY_AUTO_OTA, 0, 0 },
- (osThreadFunc_t)auto_ota_task_main, NULL, NULL, USE_EXTEND_MEM },
+ (osThreadFunc_t)auto_ota_task_main, NULL, NULL, USE_DTCM_MEM },
#endif
};
lightsleep_time = (uint32_t)(sleep_info->sleep_history[PM_SLEEP_LS].total_slp_time);
lightsleep_cnt = (uint32_t)(sleep_info->sleep_history[PM_SLEEP_LS].total_slp_count);
+
uint32_t sys_slp = readw(0x57004088);
PRINT("sys_slp: 0x%x\r\n", sys_slp);
reg16_setbit(0x57004088, 1); // clr slp history
bool m_core_sleep = pmu_msystem_sleep_history();
pmu_msystem_sleep_history_clear();
- PRINT("M core deepsleep time:%d, lightsleep time:%d, m sleep flag:%d"NEWLINE,
- deepsleep_time, lightsleep_time, (uint8_t)m_core_sleep);
+
+ pm_veto_t *pm_veto_ptr = pm_veto_get_info();
+ PRINT("M core run time %d, deepsleep time:%d, lightsleep time:%d, m sleep flag:%d"NEWLINE,
+ (uint32_t)los_system_system_run_time(), deepsleep_time, lightsleep_time, (uint8_t)m_core_sleep);
PRINT("M core deepsleep cnt:%d, lightsleep cnt:%d"NEWLINE, deepsleep_cnt, lightsleep_cnt);
- PRINT("M core last veto id:%d, last veto count:%d"NEWLINE, sleep_info->sleep_veto.last_veto_id,
- sleep_info->sleep_veto.last_veto_count);
+ PRINT("M core last veto id:%d, last veto count:%d, total_counts=%d"NEWLINE, sleep_info->sleep_veto.last_veto_id,
+ sleep_info->sleep_veto.last_veto_count, pm_veto_ptr->veto_counts.total_counts);
oml_pf_log_print1(LOG_BCORE_PLT_DRIVER_REBOOT, LOG_NUM_DRIVER_LPC, LOG_LEVEL_INFO, "sys_slp: 0x%d", sys_slp);
oml_pf_log_print4(LOG_BCORE_PLT_DRIVER_REBOOT, LOG_NUM_DRIVER_LPC, LOG_LEVEL_INFO,