Thread 中讨论的其他器件:SYSBIOS
我需要在运行时创建 HWI 中断。
我在文档中找到了这个页面、似乎解释了我需要什么。
software-dl.ti.com/.../IHwi.html
但我尝试它只是为了找出 Hwi_create 只是调用 xdc_runtime_Error_raiseX
我正在使用 BIOS 6.83.00.18
我缺少什么?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我需要在运行时创建 HWI 中断。
我在文档中找到了这个页面、似乎解释了我需要什么。
software-dl.ti.com/.../IHwi.html
但我尝试它只是为了找出 Hwi_create 只是调用 xdc_runtime_Error_raiseX
我正在使用 BIOS 6.83.00.18
我缺少什么?
您是否介意与正在创建 Hwi 的代码片段共享呢? 你能否使用断点或单步执行代码来确认 Hwi 代码中的哪一行导致了错误?
请注意、我们不再为新项目推荐 SYS/BIOS、因此如果这是新项目、我们建议改用 FreeRTOS 实施方式。 这篇帖子中还有一些其他信息。
惠特尼
代码几乎是文档的副本。 我正在尝试为计时器1创建一个 hwi:
Hwi_Params hwiParams;
Error_Block eb;
Hwi_Params_init(&hwiParams);
Error_init(&eb);
// set the argument you want passed to your ISR function
hwiParams.arg = 0;
// set the event id of the peripheral assigned to this interrupt
hwiParams.eventId = 10;
// don't allow this interrupt to nest itself
hwiParams.maskSetting = Hwi_MaskingOption_SELF;
Hwi_create(13, incrementMilliseconds, &hwiParams, &eb);
在最后一个"调用 Hwi_create"之后指向 Hwi.h:
#define Hwi_create ti_sysbios_hal_Hwi_create
和到 app_pe28FP64.c:
/* create */
ti_sysbios_hal_Hwi_Handle ti_sysbios_hal_Hwi_create( xdc_Int intNum, ti_sysbios_hal_Hwi_FuncPtr hwiFxn, const ti_sysbios_hal_Hwi_Params *paramsPtr, xdc_runtime_Error_Block *eb)
{
xdc_runtime_Error_raiseX(NULL, ti_sysbios_hal_Hwi_Module__id__C, NULL, 0, xdc_runtime_Error_E_generic, (xdc_IArg)"create policy error", 0);
return NULL;
}
一个相关的问题:是否允许混合 SYSBIOS HWI 和纯中断?
此致
您需要使用 SYS/BIOS 所谓的"零延迟中断"、这基本上允许您使用常规的非 BIOS 中断、但将它们注册到 RTOS 中、以便它不会对它们造成干扰。
请参阅本常见问题解答的最小延迟中断部分:
惠特尼