Other Parts Discussed in Thread: SYSBIOS, OMAPL138, AM3359
Tool/software: TI-RTOS
Hi,
I'm trying to create a HWI for GPIO1. I wasted 2 day and didn't get it working and there is no example to check out. This is my code:
Int main()
{
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
GPIO_init();
GPIO_write((USER_LED1), GPIO_PIN_VAL_HIGH);
Hwi_Params hwiParams;
Hwi_Handle myHwi;
Error_Block eb;
Error_init(&eb);
Hwi_Params_init(&hwiParams);
hwiParams.arg = 0;
hwiParams.enableInt = FALSE;
hwiParams.eventId = 98; //<------- eventId is the int number which am335x Manual (www.ti.com/.../spruh73p.pdf)
myHwi = Hwi_create(98, myIsr, &hwiParams, &eb); //<----- or do I put the int number here as a interrupt number. When i watched TI rtos workshop diffrent architecture had diffrent ways in initializing this paremeter
//Dose the ISR function have to be specialy named or I can name it how i want?
if(myHwi == NULL){
System_abort("Hwi create failed");
}
Hwi_enable();
Hwi_enableInterrupt(5);
BIOS_start(); /* does not return */
return(0);
}
When I use interrupt number 98 in Hwi_create(98, myIsr, &hwiParams, &eb) and debug it the program crash and get error:
"No source available for "do_AngelSWI(int, void *) [C:/Users\OX areny VR\workspace_v7\LEDBIOS\Debug\LEDBIOS.out] at 0x8000d854" "
and
CortxA8: Unhandled ADP_Stopped exception 0x20023
Does anyone know how to fix this error and create a Hwi cos I have no clue how to do it.
Rafal