Skip to content
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

Port/Broadcom Switch to "unmeasured" core clock speed check #7628

Merged
merged 7 commits into from
Feb 23, 2023

Conversation

RetiredWizard
Copy link

@RetiredWizard RetiredWizard commented Feb 22, 2023

When sending requests to the video core to return the "measured" CORE clock rate the mailbox registers frequently hang preventing any further access to the video core. This PR replaces the "measured" CORE clock rate checks with an unmeasured request. Fixes #5887 & fixes #5913.

A separate pull request to adafruit/broadcom-peripherals (adafruit/broadcom-peripherals#1) is being submitted to add the additional mailbox call routine.

This will also resolve the deinit issue noted in #5887

Tested on zero2w, zero_w and pi4b.

@RetiredWizard
Copy link
Author

So the updated broadcom-peripherals changed a lot of the parameter names. I'm working my way through the modules swapping in the new names but it's going to take a while.

@RetiredWizard
Copy link
Author

RetiredWizard commented Feb 23, 2023

There was one file in the broadcom-peripherals repository that needed to be updated with the new parameter names. I'll wait for that to be merged (adafruit/broadcom-peripherals#2) before pushing the hopefully final updates for this PR

As an aside, during my testing it seemed like some of the 4b SD card issues with the 4b were improved after using the new peripherals folder, although I've been fooled before when things seem to get better for awhile :/. The zerow and zero2w I tested with, both seem pretty solid once this PR is applied. I 've only been testing a couple hours now but haven't seen #5628 with this PR yet either NVM just occurred.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you for the updates!

@tannewt tannewt merged commit d5e936c into adafruit:main Feb 23, 2023
@RetiredWizard RetiredWizard deleted the broadcomspi branch February 23, 2023 21:02
@criptych
Copy link

Is it safe to assume that this didn't yet make it into 8.0.3? I'm experiencing similar issues trying to control a Crickit HAT (which communicates via I2C): motors are moving out of sync, updating the onboard NeoPixel has an obvious delay; but I only noticed now that this wasn't merged until yesterday.

@RetiredWizard
Copy link
Author

RetiredWizard commented Feb 25, 2023

Looking at the github 8.0.3 tag this update isn't included so I'm guessing it hasn't been merged into the released builds yet. If you used the "absolute newest" link from the circuitpython.org downloads page you should get a firmware file with this update merged in.

I would love to hear if this resolves the timing issues :)

@dhalbert
Copy link
Collaborator

This was merged into main, which is on the 8.1.0-beta track, and will probably not be backported to the 8.0.x branch. We'll be making 8.1.0-beta.0 soon.

@criptych
Copy link

criptych commented Mar 3, 2023

Good to know, thank you both. I should have some time this evening to check out the beta.

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.

Broadcom Slow I2C Broadcom: Can't set baudrate on SPI bus
4 participants