when I use ARTX with liuminary's LM3S8962 in ISR if I use isr_evt_set, it run into hard fault,if not use the function,it run ok,i don't know why,can I get help?
void key_int_isr( void ) __irq { /* Clear the interrupt. */ GPIOPinIntClear(GPIO_PORTE_BASE, KEY1); GPIOPinWrite(GPIO_PORTA_BASE, BEEP,0); //beep on delay(20000); GPIOPinWrite(GPIO_PORTA_BASE, BEEP, BEEP);//beep off keyflag=1; // isr_evt_set (EVT_KEY, t_key); //Send event to 'handle_key_task' }
I don't like your delay function. Delays are not too nice in interrupt handlers. Also, how is it defined?
And what is the definition for t_key? Is it of the correct type, and has it been initialized by a call to any os_tsk_createXX function?
beep and delay() are only for test the isr. in my who program,there three tasks,include t_task,if I use os_evt_set() in a task,t_task work well, if delete the os_evt_set statment,the isr work well. I have ever used FreeRTOS, in isr ,it must set to not switch task, so I guess the ARTX's os_evt_set also need the function.
FreeRTOS, RTX...do you think anybody here can actually follow what you are trying to say? please be come concise.