Skip to content

Espressif pwmout reset fixes #6898

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

Merged
merged 3 commits into from
Sep 14, 2022
Merged

Conversation

dhalbert
Copy link
Collaborator

  • Fixes Brightness is zero on startup on FunHouse, Feather ESP32-S3, etc. #6896.

  • The logic in pwmout_reset() was not checking the "never reset" flags for PWMOut correctly. It was partly the inverse of what it should have been. Fix this. The display brightness PWMOut was being reset multiple times due to this.

  • esp32-camera code was resetting LEDC channel 0 clock by mistake, causing dark display on ESP32-S2 TFT.

  • Removed some power-pin-reset bug workaround code which may or may not have been necessary due to this bug.

  • Reordered display initialization in main() to avoid pwmout_reset() calls in board.c files.

  • Removed unnecessary "never reset pin" calls in board.c files. The display constructor does this already.

@jepler I have a PR into esp32-camera, and this refers to that tenative commit, but you may want to fix this a different way.

@dhalbert dhalbert requested a review from jepler September 13, 2022 01:46
Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this on a funhouse both with the automatic and manually creating the display. Works fine now (manual test I set the frequency back to 500Hz just to ensure that was gone).

Side note: is there a reason the funhouse SPI frequency is so low compared to other boards? Not related to this PR but noticed it while reviewing.

@dhalbert
Copy link
Collaborator Author

Side note: is there a reason the funhouse SPI frequency is so low compared to other boards? Not related to this PR but noticed it while reviewing.

This is related to #6236 and #6416, though I don't know whether FunHouse needs a change for linearity as well.

@dhalbert dhalbert requested a review from gamblor21 September 14, 2022 22:39
@dhalbert
Copy link
Collaborator Author

@jepler @gamblor21 Just need another review. Latest commit is just the merge commit for the fix to the camera library. The code is the same.

Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked on my FunHouse. Looks good to me.

@dhalbert dhalbert merged commit 14fc4a0 into adafruit:main Sep 14, 2022
@dhalbert dhalbert deleted the espressif-pwmout-reset branch September 14, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brightness is zero on startup on FunHouse, Feather ESP32-S3, etc.
2 participants