This code executed without any problem, and I can see an AP name "avago" from my laptop. When did you receive the reset signal?.
Every few minutes, the ESP dumps and punyforth reloads. Not so bad, except when testing new stuff and I then lose my my code and have to reload it too.
Now, if your system is stable, then the ESP-12-F and its code can be assumed to be OK. All I have is the ESP-12-F module in a breadboard, with the few jumper wires to get it to boot correctly, power and io. I started with power coming from the USB-to-serial board, but even using a 3.3V supply from a regulator powered by a 9V battery made no real difference. By changing to just 2 AA cells, stability of the ESP module improved to 1 restart in 2 hours. It looks like I need to include a storage capacitor on the power inputs to provide for power surge demand spikes. I'll do that and tell you more tomorrow (or whenever).
During that 2 hour test, I had both my phone and laptop attempting to obtain a stable connection to 'avago'. Neither succeeded, though I have not yet checked exactly how far either of them got and why they keep disconnecting. Please can you also check if you can get a stable connection from another device to 'avago'. If so, then it can only be the breadboard or power supply to be sorted. Thank you.