--- Quote Start ---
originally posted by mike desimone@Nov 8 2005, 06:32 PM
i am confused as to the purpose of 'abe'. but one thing that bothers me is that it is being messed with in two locations. hopefully, that isn't a problem since the irq in question is masked.
try returning (cyg_isr_handled | cyg_isr_call_dsr) from your isr.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10862)
--- quote end ---
--- Quote End ---
Dear Mike
The process of isolating the problem has stripped the code for all meaningfull purposes. As it is it just mask the interrupt, which is then unmasked in the DSR. The abe variable is declared volatile and some other process does a printf.
I shifted from the Nios 1 because I saw some very rare but unexplainable behaviour where the compiler just generated nonsense code. When I inserted debug code the problem vanished. As I have this code in production and want to be able to make minor changes without worrying about the whole thing breaking in some unrelated place, and because of the obvious benefits of Nios II, I decided to try an upgrade.
When I see stuff like this and cannot explain it I fear the same thing happening again. As I have a huge code base and porting it from Nios1 to NiosII and eCos is quite an investment I'd like it to solve my problems.
In the examples the return codes are identical - but one works the other dont. The differences are in the ISR code alone which runs with interrupts disabled, so I have a hard time seeing that a context switch or the like could mess something up. Also the timing must be close to identical in the two code snippets.
The compiler chooses to use some other registers but as far as I can see in the objdumps all these registers should be stored/restored during a isr.
BTW I've tried to return both values but it makes no difference
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif
If the DSR mechanism was just plain broken I could manage.
Hope that some gifted person can correct whatever I do wrong.