Hi,
I have a system that works with MQX RTOS 3.5 on Coldifire MCF52259 one task always active with priority 8 plus a kernel isr
TASK_TEMPLATE_STRUCT MQX_template_list[] =
{
// Task number, Entry point, Stack, Pri, String, Auto?
{ MAIN_TASK, Main_task, 5000, 8, "main_prof", MQX_AUTO_START_TASK, 0L, 0},
{ 0, 0, 0, 0, 0, 0, 0L, 0 }
};
#define GPT0_INTERRUPT_LEVEL 7
#define GPT0_INTERRUPT_PRIORITY 7
_int_install_kernel_isr(MCF5225_INT_TIMA_C0F,(void (_CODE_PTR_)(void))isrINT_CF0);
_mcf5225_int_init(MCF5225_INT_TIMA_C0F,GPT0_INTERRUPT_LEVEL,GPT0_INTERRUPT_PRIORITY,TRUE);
With this configuration, when my hw interrupt starts, the system blocks the task and execute the interrupt or I need to use task queue inside interrupt kernel for suspending the task?
Hi Shinji,
I am having difficulty getting my kernel interrupt working for me, I do not know how/what to save/restore before and after my function call in kernel ISR, I was wondering if you could explain to me about your approach on how you are doing your kernel ISR?
Thanks;
Geek19
Reading the MQX User guide I see there are restrictions on ISRs, so if I use a kernel interrupt I can't use _taskq_suspend()
_taskq_suspend_task()
these restrictions are valid also for kernel interrupts?
The kernel isr is not handled by MQX at all - it must not call any MQX function.
You should pass information to other tasks (if required) by an application-implemented mechanism (usually
ring buffers with head and tail pointers and total size fields).
For more information see Reference Manual chapter:
2.1.45 _int_install_kernel_isr
PetrL