The problem I've had until now is that when I was near to isolate the code that was causing the bug, the error changed. So if now I add the inhibition of the timer, the error does not occur.
Anyway, I've been having problems with the timer interrupt disabled, so I don't think that the problem is the timer.
So the actual situation is that I've spoken with the hardware designer of the board, and we have chhanged a parameter in the SOPC builder, that was realted to the wr_enabled of the flash, and it seems to work.
I am not sure if this was the problem, as other times we have modified something wich seemed to be the problem, and a few days later the "ghosts" have come back.
If the problems appear again, I wll come here again. Thank you for the help.
aLeX