-----Original Message----- From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Martin Sent: 18. maj 2004 18:17 To: ecos-discuss@sources.redhat.com Subject: [ECOS] Problems with interrupt and RTC on AT91EB40A I have just plugged in a completely new EB40A board and can not use functions as cyg_thread_delay and alarm handlers. If I try to sample the system clock repeatedly with cyg_real_time_clock, I get the same result/time every try. I suggest that the hardware clock does not generate interrupts, but is this not standard? The ecos tree is built from configtool with standard configuration for EB40A. I have not manually disabled any interrupts in my code (trying to just basicly making the twothreads.c example run). Any ideas for me to try are more than welcome. Regards, Martin Update: When I choose the eCos template related to EB40A I get a conflict: Item: CYKPKG_HAL_ARM_AT91_EB40A, Conflict: unsatisfied, Property: Requires CYGHWR_HAL_ARM_AT91 == "R40008" Proposed Solutions: Item: CYGHWR_HAL_ARM_AT91, Value R40008 Item: CYGNUM_HAL_RTC_PERIOD, Value 20625 Item: CYGNUM_HAL_ARM_AT91_CLOCK_SPEED, Value 66000000 Is this a problem? If I do not choose to solve the conflicts, eCos will not build. Martin Problem solved. The problem was that the timer counter 0 (TC0) in the ARM7TDMI processer was not enabled, i.e. it was not running. A solution to the problem is to modify two files plf_io.h and at91_misc.c and then rebuild. This was inspired by http://sources.redhat.com/ml/ecos-discuss/2003-02/msg00272.html, but changes made there was compliant with an older CVS version. I have attached the two modified files as we use them, and if changes to the original files in CVS are made later on, then look through the changes made by me and take what is needed. The changes are shown between // Begin Antenna2k4 changes ...Code... // End Antenna2k4 changes I have tried to use the timer0 on two new AT91EB40A evaluation kits, and both of them were not able to start timer0, before the changes was made. Regards, Martin