m68k clock problem
Nicolas PIGEON
pigeon.nicolas at wanadoo.fr
Mon May 26 11:43:26 UTC 2003
Hi Victor,
>Nicolas,
>Disclaimer: I have no previous experience with 68302.
>I guess you are using debugger to trace the interrupt handler. Sometimes
>it is possible. But have in mind that timer continues to tick while you
>trace the interrupt handler. When you leave the interrupt handler, next
>timer interrupt ready to be served. It is not happend before because
>processor
>level is higher than interrupt level while interrupt handler executed.
>RTS instruction restore previous processor level, and next interrupt
>occurs immediately after RTS instruction.
>You may try to patch gdb stub to reset timer when trace interrupt handler
>leaved.
I don't use a debugger but a HP logic analyzer which monitors various signals around the 68302 (Address bus, data bus, chip select...). The system always runs as it would in a real environment.
>If this is not a case, the situation you describe looks like
>you miss to reset interrupt condition in timer block when interrupt handler
>executed. Looking through ckinit.c, I see that this is done.
>Nevertheless check
>twice all definition against documentation.
Indeed, the interrupt condition seems to be reset inside the interrupt handler (according to the code), but I never jump inside that routine, not even once !!
>Another possibility timer ticks too frequent due to wrong divider. Check
>this too.
I tried to set a Prescaler value of 16 in the TMR, but the problem occurs exactly at the same place...
>Victor
Thanks a lot for your ideas, it helped me check some points!
More information about the users
mailing list