NVT | NT96672开启USB CAM报内存不足

NVT | NT96672开启USB CAM报:ERR:nvtmpp_heap_malloc() ddr1, wanted_size=0xd5c690 , free_remain=0x5519c0, max_free_blk=0x551930


Mode {MOVIE} Close end
Mode {USBMenu} Open begin
Mode {USBCAM} Open begin
mode:6
 -display count=1, insert_mask=01, attach_mask=01
mode:6
 -sensor count=1, insert_mask=0001, attach_mask=0001, disp_mask=0001
 -lens count=0
ERR:nvtmpp_heap_malloc() ddr1, wanted_size=0xd5c690 , free_remain=0x5519c0, max_free_blk=0x551930
ERR:_nvtmpp_vb_init_common_pools() init pool_id 1 fail
ERR:UVACExe_InitCommonMem() nvtmpp init vb err: -1
Mode {USBCAM} Open end
Mode {USBMenu} Open end
SOUND_CB_STOP


static INT32 UVACExe_InitCommonMem(void)
{

    NVTMPP_ER        ret;
    NVTMPP_VB_CONF_S st_conf;

    memset(&st_conf, 0, sizeof(NVTMPP_VB_CONF_S));
    st_conf.ddr_mem[0].Addr = OS_GetMempoolAddr(POOL_ID_APP);
    st_conf.ddr_mem[0].Size = OS_GetMempoolSize(POOL_ID_APP);

    st_conf.max_pool_cnt = 64;

    st_conf.common_pool[0].blk_size = 1920 * 1080 * 3 / 2 + 1024;
    st_conf.common_pool[0].blk_cnt = 4 * 3;
    st_conf.common_pool[0].ddr = NVTMPP_DDR_1;
    st_conf.common_pool[1].blk_size = 1080 * 720 * 3 / 2 + 1024;
    st_conf.common_pool[1].blk_cnt = 4 * 3;
    st_conf.common_pool[1].ddr = NVTMPP_DDR_1;
#if UVAC_USE_SPECIFIED_BUF
    st_conf.common_pool[2].blk_size = IPC_RESERVED_SIZE + 1024;
    st_conf.common_pool[2].blk_cnt = 1;
    st_conf.common_pool[2].ddr = NVTMPP_DDR_1;
    st_conf.use_reserved_mem = TRUE;
#endif
    ret = nvtmpp_vb_set_conf(&st_conf);
    if (NVTMPP_ER_OK != ret) {
        DBG_ERR("nvtmpp set vb err: %d\r\n", ret);
        return -1;
    }
    ret = nvtmpp_vb_init();
    if (NVTMPP_ER_OK != ret) {
        DBG_ERR("nvtmpp init vb err: %d\r\n", ret);
        return -1;
    }
    return 0;

}

请参考:NVT | 内存不足,调试、优化-20230527

LCD = Disp_VIRTUAL_LCD1_OFF


---------------------------------------------------------
LD VERISON: LD_NVT
FW VERISON: V00.3
FW --- Daily Build: May 27 2023, 16:39:39
---------------------------------------------------------

FW Full loaded, force used Safe mode.
System_OnPowerPreInit(): Start low-battery check (dummyload).
delta=(0.000, 0) Ave_V:0.572 V2:0.572, 511, 511, Cal = 0 
Power On Sequence = Safe
gNANDTypeSelect = 2
Set user define SPI-NOR table success

Device ID = 0xef 0x40 0x17 0x00 0x01
emu user define spi-nor tbl Maker ID found @[00][0xef] DeviceID[0x40] cap[0x17]
PStore uiBufSize=262144
PS_DESC_BLOCK=1
ERR:usb_chkCharger() line sts check2: charge PC
USB 1.5A
USB_CB(): USB charging current.
CONNECT to Charging PC
WRN:System_OnInputInit() RepeatCnt: 10
System Boot end
On Boot begin
Read UIINFO
Boot from temp file, use default flags
[Load_UserInfo][PStore read UserInfo]
Boot from temp file, use default flags
===Movie Rec Set Vol = 100
MovieExe_OnCodec(): uiSelect 0
[Init_UserInfo][PStore update UserCali]
WRN:SetupExe_OnBeepVolume() uhSelect 3 
WRN:sdioHost_setBusClk() SDIO host0 : real clock (398340Hz) is not equal to desired (399000Hz)
WRN:sdioHost_setBusClk() SDIO host0 : real clock (398340Hz) is not equal to desired (399000Hz)
HS
SDIO0 open: func grp1: 0x8003
sdioPrtcl_setSDSpeedMode= 0x80fffff1
UISound_Play() index: 16
SOUND_CB_START
 DXSOUND_CAP_VOLUME 90
 gCurDrvSndVol 90
[OpenTestFlag] Begin.
[OpenTestFlag] End.
{
    "Resolution":    {
        "1920x1080,1280x720":    0
    },
    "Photo Size":    {
        "2M":    0
    },
    "Record file size":    {
        "1Min,3Min,5Min,10Min":    0
    },
    "Auto Mode":    {
        "Auto,Manual":    1
    },
    "Volume":    {
        "Off,Low,Normal,Highl":    3
    },
    "Recycle Recording":    {
        "Off,On":    0
    },
    "Depart ID":    {
        "":    ""
    },
    "Depart Name":    {
        "":    ""
    },
    "User ID":    {
        "":    ""
    },
    "Device ID":    {
        "":    ""
    }
}
Mode {MOVIE} Open begin
mode:1
drv_sensor_power_turn_on sensor[0]: CMOS_GC2053M
 POW_CTRL_TURN_ON!!!
CHK: 1324, sen_power_ctrl_gc2053m
 -sensor count=1, insert_mask=0001, attach_mask=0001, disp_mask=0001
 -lens count=0
[0]blk_size 0x239c80, w 1440, h 1080, blk_cnt 4, ddr 0
[1]blk_size 0x400, w 0, h 0, blk_cnt 5, ddr 0
[2]blk_size 0x95500, w 848, h 480, blk_cnt 4, ddr 0
[IMGCAP][0] exif_func = 1
root[0] A:\
root[2] A:\
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-7
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
Set id5 MOVIEMULTI_PARAM_SIZE - 848/480(ret=0)
Set id5 MOVIEMULTI_PARAM_FRAMERATE - 1(ret=0)
Set id0 MOVIEMULTI_PARAM_SIZE - 1920/1080(ret=0)
Set id0 MOVIEMULTI_PARAM_FRAMERATE - 30(ret=0)
Set id0 MOVIEMULTI_PARAM_DAR - 0(ret=0)
Set id13 MOVIEMULTI_PARAM_SIZE - 848/480(ret=0)
Set id13 MOVIEMULTI_PARAM_FRAMERATE - 30(ret=0)
Set id13 MOVIEMULTI_PARAM_DAR - 0(ret=0)
id0:
rec1 = 1920/1080@30
rec2 = 848/480@30
wifi = 848/480@30
disp = 320/240@30
alg  = 848/480@30 (AlgEn = 1)
SWITCH: total 3 result
SWITCH: in[0] 1920 x 1080 . 3. 30
SWITCH: in[1] 848 x 480 . 3. 30
SWITCH: in[2] 320 x 240 . 3. 30
SWITCH: connect in 6 to out 12
SWITCH: connect in 7 to out 13
SWITCH: connect in 8 to out 14
SWITCH: connect in 7 to out 15
SWITCH: connect in 7 to out 16
gSwitchLink[0][]=0/1/2/1/1/-1
gUserProcMap[0][]=0/1/2/-1
gMainRecDataPort[0]   = 0
gStreamingDataPort[0] = 1
gDispDataPort[0][]    = 2/0
gAlgDataPort[0]       = 1
[PQ] pqs_libext_search--> search pqs libext name = IQ_PARAM_GC2053_EVB 
[PQ] ae_libext_search--> search ae libext name = AE_PARAM_GC2053_EVB 
AWB[0]=>AWB_PARAM_GC2053_EVB <-> AWB_PARAM_GC2053_EVB
[PQ] awb_libext_search--> search awb libext name = AWB_PARAM_GC2053_EVB 
========== AE_CBMSG_PREVIEWSTABLE ==========
MovieExe_OnSHDR(): 0 
ERR:Dx_Getcaps() DX_NULL_POINTER
ERR:MovieExe_RatioSizeConvert() devRatio w=0, h=0
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:x_vdodisp_err() [0]-4
ERR:MovieExe_RatioSizeConvert() devRatio w=0, h=0
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:usb_chkCharger() line sts check2: charge PC
USB 1.5A
USB_CB(): USB charging current.
CONNECT to Charging PC
MovieExe_OnMovieSize(): uiSelect 11
===Movie Rec Set Vol = 100
MovieExe_OnDefog(): 0 
MovieExe_OnCodec(): uiSelect 0
free=0x3a427c0000, 5=0x13c384, sec=193187!
MovieExe_GetMaxRecSec(): tmp max sec 193187
Mode {MOVIE} Open end
On Boot end
ERR:Ux_Redraw() Not Assign Renderer!
MovieExe_OnCallback(): [cb]335556353
ERR:Ux_Redraw() Not Assign Renderer!
MovieExe_OnCallback(): [cb]335556354
MovieExe_OnCallback(): [cb]NVTEVT_ALGMSG_PREVIEW_STABLE 
free=0x3a427c0000, 5=0x13c384, sec=193187!
MovieExe_GetMaxRecSec(): tmp max sec 193187
ERR:Ux_Redraw() Not Assign Renderer!
ERR:Ux_Redraw() Not Assign Renderer!
battery changed 3**********
ERR:Ux_Redraw() Not Assign Renderer!
ERR:Ux_Redraw() Not Assign Renderer!
ERR:usb_chkCharger() line sts check2: charge PC
USB 1.5A
USB_CB(): USB charging current.
CONNECT to Charging PC
USB_CB(): USB inserted.
ERR:Ux_Redraw() Not Assign Renderer!
USBConnectType=3
Mode {MOVIE} Close begin
WRN:_LinkPortCntDec() Count is already changed but not set yet!
WRN:_LinkPortCntDec() Count is already changed but not set yet!
WRN:_LinkPortCntDec() Count is already changed but not set yet!

IPL_RT: Id: 0[Path3], en: 0
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
ERR:x_vdodisp_err() [0]-11
ERR:x_vdodisp_err() [0]-3
ERR:x_vdodisp_err() [0]-4
WRN:x_vdodisp_wrn() [0]-2
 WRN: nvtmpp common buffer not all freed !!!!
-----COMMON POOL ----------------------------------------------------------------
PoolId            DDR        Addr    BlkSize     BlkCnt  Free  MinFree
  0                 1  0x4130AC00   0x00239C80        4     4        4
PoolId            DDR        Addr    BlkSize     BlkCnt  Free  MinFree
  1                 1  0x40020840   0x00000400        5     5        5
PoolId            DDR        Addr    BlkSize     BlkCnt  Free  MinFree
  2                 1  0x41BF1FC0   0x00095500        4     2        0
 BlkId     BlkAddr     WantSize   User Dummy ImgTrans VdoOut ImgPipe UserProc Switch1 
   0    0x41BF2000   0x0001C200      0     0        0      1       0        0       0 
   1    0x41C87540   0x0001C200      0     0        0      1       0        0       0 

Mode {MOVIE} Close end
Mode {USBMenu} Open begin
Mode {USBCAM} Open begin
mode:4
 -sensor count=1, insert_mask=0001, attach_mask=0001, disp_mask=0001
 -lens count=0
ERR:nvtmpp_heap_malloc() ddr1, wanted_size=0xd5c690 , free_remain=0x959840, max_free_blk=0x9597b0
ERR:_nvtmpp_vb_init_common_pools() init pool_id 1 fail
ERR:UVACExe_InitCommonMem() nvtmpp init vb err: -1

不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 以下回答来自chatgpt:

    抱歉,作为AI语言模型并不具备编写代码和解决硬件问题的能力,建议您向相关技术支持或社区提出该问题,寻求更专业的帮助。


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^