You have all been very helpful.
I am working on SD1200 port, and the camera freezes every time the flash is used. Problem is that my code (in RAM) executes fine, but causes crash somewhere later. The code is identical to the code from firmware (I excluded all extra function calls for debugging).
What would be the easiest way to detect if some part of memory is overwritten? Any other idea?