From a0937fcf7ca605b349bb0219e6f5b5110cff6f42 Mon Sep 17 00:00:00 2001 From: "huanfeng.wang" Date: Tue, 28 May 2024 18:57:45 +0800 Subject: [PATCH] =?UTF-8?q?1:shell=E7=BA=BF=E7=A8=8B=E5=BB=B6=E6=97=B6usle?= =?UTF-8?q?ep(10)=E6=94=B9=E4=B8=BAosp=5Fdelay(2000)=202:=E6=89=A9?= =?UTF-8?q?=E5=A4=A7shell=E9=98=9F=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osp/inc/ospSwQueue.h | 2 +- osp/src/ospShell.c | 3 ++- osp/src/ospSwQueue.c | 31 ++++++++++++++++--------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/osp/inc/ospSwQueue.h b/osp/inc/ospSwQueue.h index bc92d49..f64d3eb 100644 --- a/osp/inc/ospSwQueue.h +++ b/osp/inc/ospSwQueue.h @@ -16,7 +16,7 @@ #define __OSP_SW_QUEUE_H__ #define SPU_APE_RFM_QUE_SIG_SIZE (512) /* 软件队列一个单位的长度为512字节 */ -#define OSP_APE_RFM_SHELL_QUE_DEP (8) /* Shell软件队列的深度为8 */ +#define OSP_APE_RFM_SHELL_QUE_DEP (80) /* Shell软件队列的深度为8 */ #define OSP_APE_RFM_QUE_DEP (256) #define OSP_APE_RFM_MSG_QUE_DEP (128) diff --git a/osp/src/ospShell.c b/osp/src/ospShell.c index 9b39f36..11b88f2 100644 --- a/osp/src/ospShell.c +++ b/osp/src/ospShell.c @@ -98,6 +98,7 @@ OSP_CMD_RTN ospCmdRtnTbl[MAX_CMD_NUM] = {"hb", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)get_heartbeat_status, "test heartbeat", 0}, {"apecmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_ape_cmd_show, "show ape register cmd", 0}, {"armcmd", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_arm_cmd_show, "show arm register cmd", 0}, + {"armreg", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_insert_cmd, "arm trend register", 4}, {"version", (OSP_FUNCPTR)osp_shell_wrapper, (OSP_FUNCPTR)osp_soft_version_show, "show soft version info", 0}, //{"level_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_set_log_level, "set ape log level", 1}, //{"csu_stop_ape", (OSP_FUNCPTR)osp_shell_wrapper,(OSP_FUNCPTR)osp_ape_csu_stop_cfg, "set csu start or stop", 2}, @@ -1646,7 +1647,7 @@ uint64_t osp_shell_task(void) } } - usleep(10); + osp_delay(2000); return OSP_OK; } diff --git a/osp/src/ospSwQueue.c b/osp/src/ospSwQueue.c index 53c3881..335c6fb 100644 --- a/osp/src/ospSwQueue.c +++ b/osp/src/ospSwQueue.c @@ -22,11 +22,11 @@ #define OSP_APE_RFM_LOG_SIZE (0x00080000) /* Log软件队列一个队列的总内存(512K) */ #define OSP_APE_RFM_SHELL_OFFSET (0x0B600000)//(0x00800000) -#define OSP_APE_RFM_SHELL_SIZE (0x00001000) /* Shell软件队列一个队列的总内存(512*8) */ +#define OSP_APE_RFM_SHELL_SIZE (0x0000A000) /* Shell软件队列一个队列的总内存(512*80) */ #define OSP_APE_RFM_QUE_NUM (36) /* 一共36个软列队 */ -#define OSP_APE_SHARE_OFFSET (0x0B618000)//(0x00818000) +#define OSP_APE_SHARE_OFFSET (0xB6F0000)//(0x00818000) #define SPU_APE_RFM_QUE_FLAG_USED (0x5a5a) #define SPU_APE_FRM_QUE_FLAG_POS (2) @@ -84,19 +84,20 @@ uint8_t osp_sw_queue_init() } /* APE_RFM_SHELL */ - pvlog_addr = gpsw_que_static_mem + OSP_APE_RFM_SHELL_OFFSET; - for (u8loop = 0; u8loop < OSP_APE_RFM_SHELL_NUM; u8loop++) - { - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].pvaddr = pvlog_addr + (u8loop*OSP_APE_RFM_SHELL_SIZE); - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_id = (OSP_APE_RFM_LOG_NUM + u8loop); - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_type = OSP_SW_QUEUE_SHELL; - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u8queue_offset = 8; - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_dep = OSP_APE_RFM_SHELL_QUE_DEP; - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mask = (OSP_APE_RFM_SHELL_QUE_DEP - 1); - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mem_idx = 0; - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_full_count = 0; - gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_empty_count = 0; - } + pvlog_addr = gpsw_que_static_mem + OSP_APE_RFM_SHELL_OFFSET; + for (u8loop = 0; u8loop < OSP_APE_RFM_SHELL_NUM; u8loop++) + { + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].pvaddr = pvlog_addr + (u8loop*OSP_APE_RFM_SHELL_SIZE); + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_id = (OSP_APE_RFM_LOG_NUM + u8loop); + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_type = OSP_SW_QUEUE_SHELL; + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u8queue_offset = 8; + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_dep = OSP_APE_RFM_SHELL_QUE_DEP; + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mask = (OSP_APE_RFM_SHELL_QUE_DEP - 1); + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u16queue_mem_idx = 0; + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_full_count = 0; + gstsw_queue_mem[u8loop+OSP_APE_RFM_LOG_NUM].u32queue_empty_count = 0; + } + return OSP_OK; }