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.

OMAP-L138: 如何在OMAP-L138 ARM核上使用sysbios中断 (即Hwi_create的使用)

Part Number: OMAP-L138
Other Parts Discussed in Thread: SYSBIOS

hello,TI大神们:

   Hwi_create(Int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *params, Error_Block *eb);

例如:我想要用ompl138 ARM核上的UART0中断,且也查到UART0的中断号为25

现在用Hwi_create函数创建中断应该如何使用?

DSP端的我知道怎使用,ARM不知该如何设置

DSP端如下:(将UART0中断号挂载到DSP CPU7号中断上)

Hwi_Params hwiParams;
Error_Block hwieb;
Hwi_Handle Hwi;

Hwi_Params_init(&hwiParams);
Error_init(&hwieb);

// set the argument you want passed to your ISR function
hwiParams.arg = 25; // ISR传递参数

// Enable this interrupt when object is created? Default is true
hwiParams.enableInt = true;

// set the event id of the peripheral assigned to this interrupt
hwiParams.eventId = 25;  // UART0中断号

// don't allow this interrupt to nest itself
hwiParams.maskSetting = Hwi_MaskingOption_SELF;

// Interrupt priority
hwiParams.priority = -1;

// OMAP_DEBUG_OUTPUT("Hwi_create-->HWI_isr_entry vector:%d \r\n",hwiParams.arg);
Hwi = Hwi_create(7, (Hwi_FuncPtr)HWI_isr_entry, &hwiParams, &hwieb);
Hwi = Hwi;
if (Error_check(&hwieb)) {
// handle the error
OMAP_DEBUG_OUTPUT("Hwi_create-->HWI_isr_entry fail!!! \r\n");
return(-1);
}

现在想问一下ARM端的Hwi_create该如何设置?

Hwi_create(Int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *params, Error_Block *eb);

主要是第一个参数不知如何设置

因为ARM端主要是IRQ 和 FIQ 两个总入口,不知是如何映射到IRQ或FIQ上的

所以能不能给个实际的例子进行设置一下

谢谢了!