This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: Problem setting up an ISR for a K60 PORT
- From: Ilija Kocho <ilijak at siva dot com dot mk>
- To: Michael Jones <mjones at linear dot com>
- Cc: ecos <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 19 Feb 2013 20:29:51 +0100
- Subject: Re: [ECOS] Re: Problem setting up an ISR for a K60 PORT
- References: <A60E30AB-6F4C-4A0E-8B39-BC76435B33D2@linear.com> <512338ED.6000705@televic.com> <5ED098DC-1719-4A66-82DA-2599E0489743@linear.com>
Mike
There isn't a general interrupt enable in Kinetis HAL. Actually there's
no GPIO interrupt support yet.
Just one note regarding interrupt priority numbering. Kinetis implements
4 bits, and by Cortex-M interrupt priority arbitration scheme it's 4
most significant bits (out of 8). Therefore your interrupt priority
should be something like 0x30. Priority 3 effectively is same as 0. For
relevant Kinetis priority numbers look for /Interrupt Priority Scheme/
in configtool.
Ilija
On 19.02.2013 15:51, Michael Jones wrote:
>>>
>> After our 'interrupt_create', we also have those calls (we use IRQ2
>> instead of your PORTA):
>> cyg_interrupt_attach(t_intrhandle);
>> cyg_interrupt_configure(CYGNUM_HAL_INTERRUPT_IRQ2, TLV_FALSE, TLV_FALSE);
>> cyg_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_IRQ2);
>> cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_IRQ2);
>>
>> Why do you call 'cyg_thread_suspend...' ? I do not see code that creates
>> a thread. And when I create a thread, I do cyg_thread_create(...);
>> cyg_thread_resume(..);.
>>
>> Why do you need a thread when your code is run by interrupts?
>
> Seeing your code, brought something to mind. I had assumed that the interrupt was enabled in the Kinetis HAL and all I had to do was configure the port. Perhaps that is not the case. I'll try to use your example and see what happens.
Indeed, there isn't a general interrupt enable in Kinetis HAL.
>
> Thanks
>
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss