Hi Josef,
This is a guess but...
when the system hangs after a "restore flags" it is normally due to some
unserviced interrupt condition.
The UART is trying to send you an interrupt but you are not servicing it
correctly therefor the interrupt is immediately reasserted.
This will seem like a hang.
The fact that after you send a character the system continues means
that the arrival of the character caused you to detect an rx ready
interrupt and whatever you did to clear that interrupt allowed the
original interrupt that caused the interrupt hang to be cleared.
If this is the case then you need to look at the status buts read from
the device and make sure that they are all handled
You have to cleat the flag but also clear the condition that caused the
flag to be set.
Hope this will help lead you to a solution.
Best Regards
Phil Wilshire
Wolf, Josef wrote:
Hello,
I use uClinuc-dist-20051014 with linux-2.4.32 on a lpc2492 (this is an
arm7tdmi from NXP). Most of the time, everything works as expected.
But sometimes, the boot hangs when init/main.c tries to open
/dev/console
(this is a serial console on the internal UART of the lpc2492). When I
enter a character on the console, the boot continues. It looks like
some
sort of race condition, since it is not exactly reproducable.
I have tried to debug. Here is what I have found out so far.
init/main.c calls fs/devices.c:chrdev_open()
chrdev_open() calls drivers/char/tty_io.c:tty_open()
tty_open() calls drivers/char/serial.c/rs_open()
rs_open() calls drivers/char/serial.c/startup()
in startup(), right after the change_speed() call and before before the
"errout:"
label at the end of the function, the invocation of the
restore_flags(flags) macro hangs.
The restore_flags() macro appears to be the __restore_flags() from
include/asm-armnommu/proc_armv/system.h which appears to look like this:
/*
* restore saved IRQ & FIQ state
*/
#define __restore_flags(x) \
__asm__ __volatile__( \
"msr cpsr_c, %0 @ restore_flags\n" \
: \
: "r" (x) \
: "memory");
I am really stuck now.
Any ideas why this restore_flags() macro hangs sometimes and how it
comes to
continue when a character is input on the console?
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev