saramonteiro opened a new pull request #3642: URL: https://github.com/apache/incubator-nuttx/pull/3642
## Summary This PR intends to do some refactoring and apply some workarounds to know issues from https://www.espressif.com/sites/default/files/documentation/eco_and_workarounds_for_bugs_in_esp32_en.pdf. - Refactoring Work: It was created the esp32_lowsetup that was being mentioned in comments but didn't exist. Initial pin configuration was moved to esp32_lowsetup. This way, the fisrt step on serial configuration is the pins one. It was removed the end pin configuration. NuttX nor termios interface support remapping pins in runtime, therefore, there's no need to detach signals from that pins or reconfigure it. Actually, this approach can cause unpredictable behavior on these pins as has already been seen in ESP32-C3 experiences. - Fixing Work: It was changed the way we access RX FIFO for reading and for writing. Now we use an AHB address for writing. This and others workarounds are at https://www.espressif.com/sites/default/files/documentation/eco_and_workarounds_for_bugs_in_esp32_en.pdf. It was changed the way we count RX FIFO bytes, since the standard way was not reliable. It was added a reset step to reset both RX and TX FIFOs. What was not solved: Unfortunately, after all this reorganization and fixes, the garbage between bootloader and NuttX initialization is still there. ## Impact This PR may impact ESP32 serial users or drivers that rely on serial driver. ## Testing Nsh defconfig. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
