AtMega hangs up and doesn't respond to anything anymore
Do you mean the 32u4, the ar9331 or the Yun as a whole? What exactly stops happening?
Can you still ssh into the Yun? Can you still talk to the Yun over USB? Can you still access the Yun web interface?
It's only the AtMega (32u4) that doesn't respond anymore; I can communicate fine with the MIPS processor; it just can't talk to th AtMega anymore; it is stone dead. It comes up fine again after a reset though ...
I am quite sure that the issue is not a memory leak or a bug in my code;
Don't totally discount memory being the problem, the 32u4 has 2.5k of sram the Mega has 8k.
I know, I'm only using this many bytes of Flash/RAM:
Sketch uses 16,590 bytes (57%) of program storage space. Maximum is 28,672 bytes.
Global variables use 612 bytes (23%) of dynamic memory, leaving 1,948 bytes for local variables. Maximum is 2,560 bytes.
To see if the Yun is causing a RFI problem with your receiver, run your setup on the Mega and put the Yun as close as possible to where it would be if you were using it and power it up.
I'll check it and thanks for the tip,