TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2640R2 启动初始分过程中icall_directAPI函数报ICALL_ERRNO_TIMEOUT错误

CC2640R2 启动初始分过程中icall_directAPI函数报ICALL_ERRNO_TIMEOUT错误,这个错误是INT问题,有时能正常启动后系统运行起来,但大部分时间是不行,

背景环境如下:

1,CCS7.3., 

2, cc2640r2_sdk_1_50_00_58,

3, cc2640r2_sdk_ble_example_pack_1_50_00_62中的hid_emu_kbd demo。

Viki Shi:

根据描述无法判断,是否对例程做了修改,具体是哪些?
PS:协议栈版本及CCS版本都太低,建议升级到最新版再测试

bing zhou:

回复 Viki Shi:

1,修改硬件配置设置,把CC2640R2_LAUNCHXL修改为CC2640R2DK_5XD
2,修改进程ICALL_MAX_NUM_TASKS个数,由4修改为5
3,其他修改跟系统启动无关。仅仅是APP task 函数的简单修改.
另外 cc2640r2_sdk_ble_example_pack_1_50_00_62在TI官网是最新版本,这个版本对应的CCS是7.3, 是否还有更新的demo pack?

uint32_t icall_directAPI( uint8_t service , icall_lite_id_t id, … )
{va_list argp;uint32_t res;icallLiteMsg_t liteMsg;
// The following will push all parameter in the runtime stack.// This need to be call before any other local declaration of variable….va_start(argp, id);
// Test that the API is not called in a Hwi or Swi context{BIOS_ThreadType threadtype = BIOS_getThreadType();
if (threadtype == BIOS_ThreadType_Hwi ||threadtype == BIOS_ThreadType_Swi){
#ifdef HALNODEBUG
#else /* ! HALNODEBUG */ICall_abort();
#endif /* HALNODEBUG */} }
// Create the message that will be send to the requested service..liteMsg.hdr.len = sizeof(icallLiteMsg_t);liteMsg.hdr.next = NULL;liteMsg.hdr.dest_id = ICALL_UNDEF_DEST_ID;liteMsg.msg.directAPI= id;liteMsg.msg.pointerStack = (uint32_t*)(*((uint32_t*)(&argp)));ICall_sendServiceMsg(ICall_getEntityId(), service,ICALL_MSG_FORMAT_DIRECT_API_ID, &(liteMsg.msg));
// Since stack needs to always have a higher priority than the thread calling// the API, when we reach this point the API has been executed by the stack.// This implies the following://- API are not called in critical section or in section where task//switching is disabled// It is possible that the stack is blocking on this API, in this case a// sync object needs to be used in order for this call to resume only when// the API has been process in full.{ICall_Errno errno;void *pCmdStatus = NULL;
errno = ICall_waitMatch(ICALL_TIMEOUT_PREDEFINE, matchLiteCS, NULL, NULL,(void **)&pCmdStatus);if (errno == ICALL_ERRNO_TIMEOUT){
#ifdef HALNODEBUG
#elifdefined(EXT_HAL_ASSERT)HAL_ASSERT(HAL_ASSERT_CAUSE_ICALL_TIMEOUT);
#else /* !EXT_HAL_ASSERT */ICall_abort();
#endif /* EXT_HAL_ASSERT */}else if (errno == ICALL_ERRNO_SUCCESS){if (pCmdStatus){ICall_freeMsg(pCmdStatus);}}else{
#ifdef HALNODEBUG
#else /* ! HALNODEBUG */ICall_abort();;——>stop hereby breakpoint
#endif /* HALNODEBUG */}}
// The return parameter is set in the runtime stack, at the location of the// first parameter.res = liteMsg.msg.pointerStack[0];
va_end(argp);
return (res);
}

Viki Shi:

回复 bing zhou:

很久没逛官网了吧,最新版SDK是3.40:

bing zhou:

回复 Viki Shi:

因为我们需要基于HID keyboad的profile来开发应用,只有在扩展demo包cc2640r2_sdk_ble_example_pack_1_50_00_62里支持这个profile demo , 目前这个版本在官网显示是最新版本,但它对应的SDK包是1.50.00.58版本才能正常运行,看如下链接扩展包支持指导,

software-dl.ti.com/…/simplelink_example_pack_users_guide.html

另外,扩展demo包是否有比目前cc2640r2_sdk_ble_example_pack_1_50_00_62版本更新的,如果有,请提供下载链接。谢谢

Viki Shi:

回复 bing zhou:

sorry 我看错了,SimpleLink CC2640R2 SDK BLE Example Pack的话最新版确实是1.50.关于icall的问题,请参考以下的类似解答:
e2e.ti.com/…/648172
e2e.ti.com/…/887989

赞(0)
未经允许不得转载:TI中文支持网 » CC2640R2 启动初始分过程中icall_directAPI函数报ICALL_ERRNO_TIMEOUT错误
分享到: 更多 (0)