-
Notifications
You must be signed in to change notification settings - Fork 3k
Prevent ESP8266 stopping HW control on init #9173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent ESP8266 stopping HW control on init #9173
Conversation
@michalpasztamobica, thank you for your changes. |
@VeijoPesonen , I tested the scenario you mentioned in a discussion: if I press the ESP reset button between the disconnection, the chip still reconnects. |
@michalpasztamobica question. Will this change also be getting backported to https://github.com/ARMmbed/esp8266-driver, since the original code was introduced here #8689?
Is there a reason we don't want to consider the use case where the MCU isn't communicating with flow control, or am I misunderstanding this statement? |
@cmonr We don't backport to that repository as we only support one version of the ESP driver, and it is always the latest one in Mbed OS repository. There is no reason to use the driver from that repository as it is just older version of this one. All development now happens in Mbed OS repository. |
@cmonr , answering your question:
Normally the reset of the MCU will also reset the ESP board - in this case both will run with or without the flow control, depending solely on the mbed_app.json config. We support both scenarios. The unrealistic scenario, which I mentioned and which we would not handle, would be that the MCU resets with a modified flow control configuration while the ESP does not reset. If the MCU has a different flow control configuration than ESP8266, they would never be able to communicate. |
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Will need to restart once CI issue is resolved. |
@michalpasztamobica It absolutely does, thank you for clarifying! |
@adbridge - one more push, can we get this merged in please? |
It was waiting for release candidate to complete, now it can proceed. |
Exporter failure is being looked at , not related here |
Exporter restarted |
Test run: FAILEDSummary: 3 of 11 test jobs failed Failed test jobs:
|
CI job restarted: Something weird happened with a target across multiple jobs. |
Description
When trying to connect ESP8266 to WiFi, after it was previously disconnect, AT commands time out. This does not occur if CTS/RTS is disabled (for example, by not configuring the pins in mbed_app.json or hardcoding them to NC in ESP8266 class constructor). This also does not occur if we do not stop the HW control inside _init() when reconnecting. The stop function was anyway immediately overwritten by the call to start_uart_hw_flow_ctrl(), right after the reset, so the change should be otherwise neutral.
Pull request type
Reviewers
@SeppoTakalo, @VeijoPesonen , please review.