From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17812 invoked by alias); 21 Oct 2003 18:07:28 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 17805 invoked from network); 21 Oct 2003 18:07:27 -0000 Received: from unknown (HELO vitacom.net.co) (64.86.248.237) by sources.redhat.com with SMTP; 21 Oct 2003 18:07:27 -0000 Received: (qmail 30223 invoked by uid 1008); 21 Oct 2003 18:06:39 -0000 Received: from unknown (HELO phaber.com) (200.75.84.164) by 64.86.248.237 with SMTP; 21 Oct 2003 18:06:39 -0000 Message-ID: <3F9575D1.6030509@phaber.com> Date: Tue, 21 Oct 2003 18:07:00 -0000 From: Carlos Perilla User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031014 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ecos Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [ECOS] eb40a Interrupt, TC X-SW-Source: 2003-10/txt/msg00377.txt.bz2 Well , finally I got two timers running, with the conf I want, Now I need to capture the interrupts that my configuration is generating, as long as the TC_SR says the events that I have programed had passed but not attended. I have set the ISR and DSR like this: cyg_uint32 interrupt_TC1_isr( cyg_vector_t vector, cyg_addrword_t data) //Based on eCos book, pag 48 { cyg_interrupt_mask(vector); cyg_interrupt_acknowledge(vector); return(CYG_ISR_HANDLED | CYG_ISR_CALL_DSR); } void interrupt_TC1_dsr( cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data) { HAL_IO_REGISTER REGISTER; cyg_semaphore_post(&TC1_data_ready); REGISTER=TC_BASE+TC_CHANNEL1+TC_RA; HAL_READ_UINT16(REGISTER,TC1_PERIOD); REGISTER=TC_BASE+TC_CHANNEL1+TC_RB; HAL_READ_UINT16(REGISTER,TC1_HIGH); cyg_interrupt_unmask(vector); } And I have created in the CYG_USER_START cyg_interrupt_enable(); cyg_interrupt_create( intTC1_vector, intTC1_priority, 0, &interrupt_TC1_isr, &interrupt_TC1_dsr, &intTC1_handle, &intTC1); cyg_interrupt_attach(intTC1_handle); cyg_interrupt_unmask(intTC1_vector); cyg_semaphore_init(&TC1_data_ready,TC1_data_ready_counter); cyg_semaphore_init(&TC1_trans,TC1_trans_counter); cyg_semaphore_init(&TC1_end_trans,TC1_ent_trans_counter); Im using two other threads to capture and transmit the data I get from here, still the Interrupt Isn't captured, and the program keeps waiting for the semaphore signal. Thanks you all. Carlos Perilla. -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss