From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4287 invoked by alias); 19 Feb 2013 19:30:02 -0000 Received: (qmail 4209 invoked by uid 22791); 19 Feb 2013 19:30:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from smtprelay-h31.telenor.se (HELO smtprelay-h31.telenor.se) (213.150.131.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Feb 2013 19:29:56 +0000 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 0E924E9787 for ; Tue, 19 Feb 2013 20:29:53 +0100 (CET) X-SENDER-IP: [85.225.31.169] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtQYAPDRI1FV4R+pPGdsb2JhbAANOIsAsmWBU4EDgSIDAQEBATiCUwEBAQECAXgBEAsOCgkWDwkDAgECARsWFAYNAQcBAYgIrRWDMZAnjw4Hg0ADliuTYA Received: from c-a91fe155.46-4-64736c11.cust.bredbandsbolaget.se (HELO [192.168.0.110]) ([85.225.31.169]) by ipb2.telenor.se with ESMTP; 19 Feb 2013 20:29:53 +0100 Message-ID: <5123D2AF.4000101@siva.com.mk> Date: Tue, 19 Feb 2013 19:30:00 -0000 From: Ilija Kocho User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Michael Jones CC: ecos References: <512338ED.6000705@televic.com> <5ED098DC-1719-4A66-82DA-2599E0489743@linear.com> In-Reply-To: <5ED098DC-1719-4A66-82DA-2599E0489743@linear.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: Problem setting up an ISR for a K60 PORT X-SW-Source: 2013-02/txt/msg00022.txt.bz2 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