-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add initial ParallelBus support for ESP32-S2 #4047
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 & 8000 ldquo;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
Conversation
I evaluated the impact of bit manipulation to convert the 8-bit data into the 32-bit register. For everything I tried, I saw no significant impact on the performance. If you have any recommendations on speeding it up, I'll be glad to try them. |
I added capability for data and write pins >= pin #32. Also, the data and write pins can be in different registers (0-31, or 32+). This is now ready for review. Best is to compare against the SAMD or NRF ports. I verified on the following hardware:
Tests:I verified the use of data0 pins in the lower register (pins #8-15), with either write pin #3 or write pin #33. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question and a request. Looks good overall. Thanks for taking this on!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I updated and commited a new revision that gives more pin options. See note below.... This is ready for review.
Special Note:
Due to what I think is a limitations of the ESP32-S2 that prevents writing a single byte (8-bits) to the output register (32-bits, I had to modify the code to write a full 32-bit chunk to the register. I would like feedback if there are faster methods for writing out the data (see lines 214-236).
(Note: If using the same register for the data lines and the write line, so I can clear the write line at the same time as writing the data. I verified that I could eliminate the "clear_write" line with no negative impact on the operation, but with approximately 13% total time reduction.)
Verified on the following hardware:
6.1.0-rc.1-15-g6a76b6002-dirty on 2021-01-22; Saola 1 w/Wrover with ESP32S2
Benchmark results
200x writes of purple.bmp using a forced refresh
display.refresh()
for each write:6.0.0-alpha.3-33-gd600759bc-dirty on 2020-09-10; Adafruit PyPortal with samd51j20
)6.1.0-rc.1-15-g6a76b6002-dirty on 2021-01-22; Saola 1 w/Wrover with ESP32S2