ARM interrupt handling
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Apr 25 17:50:37 UTC 2002
Jay Monkman wrote:
>
> On Thu, Apr 25, 2002 at 07:18:50AM -0500, Joel Sherrill wrote:
> > Jay.. if you confirm this is OK, I will merge it.
>
> It seems to work if I comment out this line:
> #define SAVE_CPSR
> in exec/score/cpu/arm/cpu_asm.S.
>
> At least the ticker sample works. A few of the sp tests fail,
> specifically
> sp04 - hangs after this output:
> TA1 - rtems_task_suspend - on Task 2
> TA1 - rtems_task_suspend - on Task 3
> TA1 - killing time
> TA1 - rtems_task_resume - on Task 2
> TA1 - rtems_task_resume - on Task 3
Does the time passage in sp01 look close to correct?
If so, then I lean to something minor wrong in the
logic in the interrupt exit code. "killing time" is spinning
waiting for time to pass. Then it monitors a "run counter"
set in a user extension.
My recommendation is to use a simulator like sparc/erc32
or powerpc/psim and trace through a working one. Then
compare the behavior. It is really handy when trying to
see what is happening in the same source base.
Do all the other tests run? It is always possible that
sp04 was randomly broken in the snapshot you are running.
That is why the simulator is so useful. Besides you can
download the gcc, binutils, and gdb w/sim as RPMs in
minutes and have some confidence.
> sp30 - times are off by 5 seconds
> ta1 runs with 10 sec interval rather than 5
> ta2 runs with 15 sec interval rather than 10
> ta3 runs with 20 sec interval rather than 15
If you get expected behavior on the simulator, I would say
this means the tick is not at the right rate.
> sp31 - I get this output:
> INIT - rtems_timer_create - creating timer 1
> INIT - timer 1 has id (0x14010001)
> INIT - rtems_timer_create - creating timer 2
> INIT - timer 2 has id (0x14010002)
> TA1 - rtems_timer_ident - identing timer 1
> TA1 - timer 1 has id (0x14010001)
> TA1 - rtems_timer_ident - identing timer 2
> TA1 - timer 2 has id (0x14010002)
> TA1 - rtems_timer_server_fire_after - timer 1 in 30 seconds
> TA1 - rtems_timer_server_fire_after - timer 2 in 60 seconds
> Timer 1 scheduled for 3084 ticks since boot
> Timer Server scheduled for 3039 ticks since boot
> TA1 - rtems_task_wake_after - 1 second
> TA1 - rtems_timer_server_fire_after - timer 2 in 60 seconds
> Timer 1 scheduled for 3084 ticks since boot
> Timer Server scheduled for 3039 ticks since boot
> assertion "(info.start_time + info.initial) == (_Timer_Server->Timer.initial + _Timer_Server->Timer.start_time)" failed: file "../../../../../../../../cvs-rtems/kernel/c/src/tests/sptests/sp31/task1.c", line 78
This is a really picky test and may indicate that the ticks are
running too fast.
Hmmm... are you running polled console IO? That would explain
some time skewing but not sp04.
> I haven't look at these in detail yet, so if you have any ideas where
> to look, I'd appreciate the help.
>
> --
> Jay Monkman The truth knocks on the door and you say "Go away, I'm
> monkman at jump.net looking for the truth," and so it goes away. Puzzling.
> - from _Zen_and_the_Art_of_Motorcycle_Maintenance_
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list