-
Notifications
You must be signed in to change notification settings - Fork 925
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
Implement RP2350 initialization clocks, uart, and (partial) USB support #4655
Implement RP2350 initialization clocks, uart, and (partial) USB support #4655
Conversation
cf620b5
to
f6e1d35
Compare
Once you make the fix I suggest @cibomahto you should rebase this branch against the |
* Merge rp2 reset code back together * Separate chip-specific clock definitions * Clear pad isolation bit on rp2350 * Init UART in rp2350 runtime
adecf53
to
2333d38
Compare
@cibomahto I had to rebuild the cached LLVM because of reasons unrelated to this PR. All tests are now passing! 🥳 |
@cibomahto looks like you need to run |
@deadprogram Everything passes again |
I just confirmed that the bootloader changes work as expected @cibomahto great work! @soypat IMO this PR can now be merged into #4459 and that PR can be set to ready for review |
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.
We can merge this but I can see a lot of things I'm going to want to unexport before next release
@soypat do you mean functions that you think should not be exported from the package? |
@deadprogram yes. A cursory glance showed a lot of USB and Clock exported functions which did not need to be exported or could better be hid from package scope behind methods on a type |
That is probably the case with the current rp2040 implementation as well. In any case we can address those things separately. |
Now rebasing this branch into the |
Yes, apologies that I'm not fluent enough in Go to know the right way to do this yet :-) |
Another thing for whatever list these go on, the USB driver both chips are almost exactly the same*, but the CMSIS register names are slightly different between the two. It would probably be best to merge them back together if possible.
|
This patch enables the clocks, uart, and partial USB support for the 2350.
I left the default console as 'uart' because if it is set to USB, using 'fmt' causes a panic. USB transfers work fine if only a single byte is transferred at a time.
Another issue is that the clock speed for RP2350 is set to 125MHz, because there were a number of places where this was hardcoded when setting up peripherals. This should at least be increased to 150MHz, perhaps as a new constant in machine_rp2_2xxxx.