Skip to content

Commit 5631051

Browse files
authored
Update a02-my-esp-crashes.rst (#7739)
Fixes formatting of bulleted list in Stack section, and misc typos/wording.
1 parent 2c17823 commit 5631051

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

doc/faq/a02-my-esp-crashes.rst

+30-28
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ If you are using generic ESP modules, please follow
6565
`recommendations <Generic%20ESP8266%20modules>`__ on power supply and
6666
boot strapping resistors.
6767

68-
For boards with integrated USB to serial converter and power supply,
68+
For boards with integrated USB-to-serial converter and power supply,
6969
usually it is enough to connect it to an USB hub that provides standard
7070
0.5A and is not shared with other USB devices.
7171

72-
In any case make sure that your module is able to stable run standard
73-
example sketches that establish Wi-Fi connection like e.g.
72+
In any case, make sure that your module is able to stably run standard
73+
example sketches that establish Wi-Fi connection like, e.g.,
7474
`HelloServer.ino <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer/examples/HelloServer>`__.
7575

7676
What is the Cause of Restart?
@@ -82,13 +82,13 @@ is wrong, it restarts itself to tell you about it.
8282

8383
There are two typical scenarios that trigger ESP restarts:
8484

85-
- **Exception** - when code is performing `illegal
85+
- **Exception** - when the code attempts an `illegal
8686
operation <../exception_causes.rst>`__,
8787
like trying to write to non-existent memory location.
88-
- **Watchdog** - if code is `locked
89-
up <https://en.wikipedia.org/wiki/Watchdog_timer>`__ staying too long
90-
in a loop or processing some task, so vital processes like Wi-Fi
91-
communication are not able to run.
88+
- **Watchdog** - if the code `locks
89+
up <https://en.wikipedia.org/wiki/Watchdog_timer>`__, staying too long
90+
in a loop or processing any other task without any pauses, which would
91+
prevent vital processes like Wi-Fi communication from running.
9292

9393
Please check below how to recognize `exception <#exception>`__ and
9494
`watchdog <#watchdog>`__ scenarios and what to do about it.
@@ -127,7 +127,7 @@ up.
127127
`SDK <https://bbs.espressif.com/viewforum.php?f=46>`__, that is part
128128
of `esp8266 / arduino <https://github.com/esp8266/Arduino>`__ core
129129
loaded to module together with your application.
130-
- **Hardware Watchdog** - build in ESP8266 hardware and acting if
130+
- **Hardware Watchdog** - built-in ESP8266 hardware, acting if the
131131
software watchdog is disabled for too long, in case it fails, or if
132132
it is not provided at all.
133133

@@ -312,9 +312,10 @@ Memory, memory, memory
312312
Stack
313313
  The amount of stack in the ESP is tiny at only 4KB. For normal development in large systems, it
314314
is good practice to use and abuse the stack, because it is faster for allocation/deallocation, the scope of the object is well defined, and deallocation automatically happens in reverse order as allocation, which means no mem fragmentation. However, with the tiny amount of stack available in the ESP, that practice is not really viable, at least not for big objects.
315+
315316
* Large objects that have internally managed memory, such as String, std::string, std::vector, etc, are ok on the stack, because they internally allocate their buffers on the heap.
316-
* Large arrays on the stack, such as uint8_t buffer[2048] should be avoided on the stack and be dynamically allocated (consider smart pointers).
317-
* Objects that have large data members, such as large arrays, should be avoided on the stack, and be dynamically allocated (consider smart pointers).
317+
* Large arrays on the stack, such as uint8_t buffer[2048] should be avoided on the stack and should be dynamically allocated instead (consider smart pointers).
318+
* Objects that have large data members, such as large arrays, should also be avoided on the stack, and should be dynamically allocated (consider smart pointers).
318319

319320

320321
If at the Wall, Enter an Issue Report
@@ -330,37 +331,38 @@ author of code in his / her repository.
330331

331332
If there are no guidelines, include in your report the following:
332333

333-
- [ ] Exact steps by step instructions to reproduce the issue
334+
- [ ] Exact step-by-step instructions to reproduce the issue
334335
- [ ] Your exact hardware configuration including the schematic
335-
- [ ] If the issue concerns standard, commercially available ESP board
336+
- [ ] If the issue concerns a standard, commercially available ESP board
336337
with power supply and USB interface, without extra h/w attached, then
337-
provide just the board type or link to description
338+
provide just the board type or a link to its description
338339
- [ ] Configuration settings in Arduino IDE used to upload the
339340
application
340341
- [ ] Error log & messages produced by the application (enable
341342
debugging for more details)
342343
- [ ] Decoded stack trace
343344
- [ ] Copy of your sketch
344-
- [ ] Copy of all the libraries used by the sketch
345-
- [ ] If you are using standard libraries available in Library Manager,
346-
then provide just version numbers
345+
- [ ] Copy of all the libraries used by the sketch (if you are using
346+
standard libraries available in the Arduino Library Manager,
347+
then provide just version numbers)
347348
- [ ] Version of `esp8266 /
348349
Arduino <https://github.com/esp8266/Arduino>`__ core
349350
- [ ] Name and version of your programming IDE and O/S
350351

351352
With plenty of ESP module types available, several versions of libraries
352353
or `esp8266 / Arduino <https://github.com/esp8266/Arduino>`__ core,
353-
types and versions of O/S, you need to provide exact information what
354-
your application is about. Only then people willing to look into your
355-
issue may be able to refer it to configuration they have. If you are
356-
lucky, they may even attempt to reproduce your issue on their equipment.
357-
This will be far more difficult if you are providing only vague details,
354+
types and versions of O/S, you need to provide exact information on what
355+
your application is about. Only then, people willing to look into your
356+
issue may be able to compare it to a configuration they are familiar with.
357+
If you are lucky, they may even attempt to reproduce your issue on their
358+
own equipment!
359+
This will be far more difficult if you provide only vague details,
358360
so somebody would need to ask you to find out what is really happening.
359361

360-
On the other hand if you flood your issue report with hundreds lines of
361-
code, you may also have difficulty to find somebody willing to analyze
362-
it. Therefore reduce your code to the bare minimum that is still causing
363-
the issue. It will help you as well to isolate the issue and pin done
362+
On the other hand, if you flood your issue report with hundreds lines of
363+
code, you may also have difficulty finding somebody willing to analyze
364+
it. Therefore, reduce your code to the bare minimum that is still causing
365+
the issue. This will also help to isolate the issue and pin down
364366
the root cause.
365367

366368
Conclusion
@@ -371,8 +373,8 @@ Do not be afraid to troubleshoot ESP exception and watchdog restarts.
371373
detailed diagnostics that will help you pin down the issue. Before
372374
checking the s/w, get your h/w right. Use `ESP Exception
373375
Decoder <https://github.com/me-no-dev/EspExceptionDecoder>`__ to find
374-
out where the code fails. If you do you homework and still unable to
375-
identify the root cause, enter the issue report. Provide enough details.
376+
out where the code fails. If you do you homework and are still unable to
377+
identify the root cause, submit an issue report. Provide enough details.
376378
Be specific and isolate the issue. Then ask community for support. There
377379
are plenty of people that like to work with ESP and willing to help with
378380
your problem.

0 commit comments

Comments
 (0)