Hi TomE,
thanks for the help, some time is passed from my last post on the issue, since i updated the u-boot bootloader to the most recent "git" version to see if the problem disappear, how the u-boot list guys suggested me, but it's still there.
Well, i explain a little better how this bootloader works:
All the vector table (now in ram at 0x00000000) is initialized with "_int_handler" or "_exc_handler", depending if the vector is an interrupt or an exception. This is a common technique used to install later specific handlers at run time.
Timer 2 is on vector dec. 31 that is correctly initialized to "_int_handler" from a "trap_init()" function.
The assembly "_int_handler:" then call the proper interrupt manager function, now i have removed that code and let "rte" only.
From an objdump of the code, "rte" opcode is correct, i don't see nothing special in the code that can cause this strange cpu behaviuor.
One thing is clear, seems to be a "cpu" bad behavior, in an exception, stack frame should have the vector/format/status 32 bits information, and just after the return address, this tio have "rte" working properly. Instead actually there is the next return address in the top of the stack.
What i suspect is that the timer is set up wrongly, to a too short period, or something similar, that maybe two interrupts are triggered too near, or something similar.
I am going on today into investigation, any idea is really appreciated.
many thanks
regards,
angelo