[quote]When I connect Xbee and disable PMM module, Xbee communicates and I can recieve the data but still writting-reading from flash is still not working. When I enable PMM module Xbee fails to communicates.[/quote] Erasing and writing the Flash also increases the power draw considerably. Seems you Vcc drops below brown-out level under increased load - either because it's too weak, or improper impedance (non-optimal PCB design, insufficient decoupling capacities). Use a scope to watch Vcc on the MCU and on the XBee module during a fail/reset, as close to the pins as possible, and keeping the wiring to the probes as short as possible.
↧