When I first built this revision of PCB, the board would reboot a lot. That turned out to be the mis-wiring of the SPI RAM. Part of that process in trouble shooting that board, I had guessed that I had a noisy power connection to the Wi-Fi module. So one thing that I had tried was adding a large reservoir capacitor and a small filter capacitor near the power pins of the module. Unless I am drawing too much current from the voltage regulator, this should eliminate any possible power issues.
This means my first test is to measure how much current is being drawn from the voltage regulator. To do that I removed the jumper that bypassed the lithium cell charger and attached 3.7V to the PCB from a bench power supply. To do this I removed all the test pins I had soldered to the module and soldered one to +BATT and another one to GND. I connected my meter in series with the power supply and turned it all back on. I measured the current consumed between 75 and 80 mA for the whole range of 0 to 99 prescaler. This measurement was made with the radio inactive.
I think I can rule out the power supply as my problem. Next I decided to change the software to take steps of 10 instead of 1 for adjusting the prescaler. If the failure is because of an accumulated error, this should happen later and I should be able to get a number larger than 100 without a failure. I re-soldered the bypass of the Lithium Cell charger and uploaded the change. I got to 91 No Failure. At 101 it still failed. I change the step to 30 and when I got to 120, I got a reset cause:2. (maybe there is a clue here, This means external reset.) I found this in the 2c-ESP8266_SDK_Programming Guide.pdf file from the Espressif BBS.
There are two pins on the module that can be used for external reset. Since the serial to usb bridge is controlling the reset line, I decided to look into the EN pin first. It looked good with the right resistor in place to pull it up. I then started looking through the code to make sure the Sigma Delta was configured to the correct pin. Turns out that it wasn’t configured to output on any pin. There was a missing statement in the code setting pin4 to output the sigma delta channel. I added that line back in, saved, recompiled, uploaded and tested again. It still is failing.
Going back to the external reset, I decided to put lower value pullup resistors on the reset lines. I changed them from 10 K to 1 K. This should reduce any affect of noise on the pins and still not draw too much current when pulled low. It still fails in the same way. I have another project where the sigma delta is working very well. The main difference I can see is that on this project I am reading the sigma delta twice before I write to it. In my other project, it reads the register once. So I am going to make a simple uint8 variable to retain the value I am writing to the Sigma Delta prescaler.
It is still not fixed. Have you seen this problem? Have you solved it?