reset message on flash

I have a nRF9160 board that is running fine with a modified asset_tracker_v2. Recently I started getting the message shown below. after some time the system does connect and everything runs fine but if I reset or reflash the message appears again. This makes the system unusable for some initial time. what am I doing wrong or missing? How do I get rid of this message and connect to LTE on startup.

[00:00:21.365,936] <wrn> modem_module: The modem has detected a reset loop. LTE network attach is now restricted for the next 30 minutes. Power-cycle the device to circumvent this restriction.

Related