This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
how can I create real time clock interrupt?
- From: =?GB2312?Q?=C0=EE=EA=CD?= <li dot hui at 263 dot net>
- To: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: Sat, 2 Nov 2002 17:49:35 +0800
- Subject: [ECOS] how can I create real time clock interrupt?
I try to create a interrupt attach to RTC,but I failed.the code I wrote as below:
cyg_handle_t timer_intr_handle;
cyg_interrupt timer_intr;
cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_RTC, 1, 0, do_count, 0, &timer_intr_handle, &timer_intr);
cyg_interrupt_enable();
cyg_interrupt_attach(timer_intr_handle);
I download my code to target, and using GDB(insight) debug my code,.When program run to the cyg_interrupt_create(...) sentence, the GDB warning me it "program recieve a signal SIGSEGV, segmentation fault" and then terminate the program.
please tell me how to solve this problem!thanks in advance!
li.hui@263.net
2002-09-18