This way interrupts on RX are initialized in the last step and are followed immediately by procedures hidden under “SOFTUART INIT DONE”.
Now my set up of SoftUART is working correctly for any power up :ok_hand:
Thank you for adding good comments to the code and diagnostics messages like above that were instrumental to fixing this issue. :thumbsup:
If you believe my analysis is correct I am ready to embark on doing my first pull request :boom:
After doing stress testing of SoftUWART I have stumbled across the following fault scenario:
If data stream is present at RX of SoftUWART during ESP8266 power up, the following exception is thrown:
For the same set up but with no data present on RX, initialization is completed correctly as follows:
Going back to fault scenario (data present at RX on power up), I believe the following happens:
Interrupts on RX are enabled:
An interrupt is triggered by data on RX but not properly serviced since the following two initialization steps still need to be complete:
To fix this issue I have reversed order of initialization of RX and TX:
This way interrupts on RX are initialized in the last step and are followed immediately by procedures hidden under “SOFTUART INIT DONE”. Now my set up of SoftUART is working correctly for any power up :ok_hand:
Thank you for adding good comments to the code and diagnostics messages like above that were instrumental to fixing this issue. :thumbsup: If you believe my analysis is correct I am ready to embark on doing my first pull request :boom: