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

Add New Board - Seeeduino XIAO RP2040 #5519

Merged
merged 9 commits into from
Dec 6, 2021

Conversation

jpconstantineau
Copy link

@jpconstantineau jpconstantineau commented Oct 27, 2021

Been in contact with MengDu from Seeed on discord.

Preparing new board for their new Seeed Xiao RP2040.
Pending review from Seeed and their PID.

EXTERNAL_FLASH_DEVICES to be confirmed. Seems small (Seeed to confirm) and not sure if this config is available (build will let us know).

This PR will kick-off a GHA job for Seeed to test the UF2 on actual hardware.

Link to Design files: https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html
Wiki: https://wiki.seeedstudio.com/XIAO-RP2040-with-CircuitPython/

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! Are you still waiting to hear about the flash?

@jpconstantineau
Copy link
Author

Yes, I did ask this morning that question specifically. With timezone differences, I would expect an answer overnight. They were pretty quick with the PID. How large is the 25x16? Most seems to use the 25x64 or 25x128 which is obviously larger.
Will a x16 be a potential issue?

@jpconstantineau
Copy link
Author

MengDu indicated that it's a P25Q16H-UXH-IR.
This is different than the schematic which indicates a GD25 device.
@tannewt Should we update EXTERNAL_FLASH_DEVICES to match? Is this device available in the flash config repo? (where is that?))

@tannewt
Copy link
Member

tannewt commented Oct 28, 2021

MengDu indicated that it's a P25Q16H-UXH-IR. This is different than the schematic which indicates a GD25 device. @tannewt Should we update EXTERNAL_FLASH_DEVICES to match?

Yup!

Is this device available in the flash config repo? (where is that?))

Repo is here: https://github.com/adafruit/nvm.toml/tree/main/flash This is a new manufacturer so it'll definitely need to be added.

@jepler jepler marked this pull request as draft October 29, 2021 16:35
@jpconstantineau
Copy link
Author

Updated the nvm.toml module and lots more boards started to fail... The module brought in a few more new files and I suspect that it's these that are causing the issues. I only tested with my files (puya)
What's the plan? Cherry pick or figure out what's wrong with these other files?

Is there a way to get where the toml processor fails?

@dhalbert
Copy link
Collaborator

dhalbert commented Nov 3, 2021

The builds are still working on recent PR's. Have you rebased or merged from upstream since the builds started failing? Your toml submodule appears to be out of date now according to the file comparisons.

@jpconstantineau
Copy link
Author

I just merged upstream and the builds are still failing.

The toml submodule has added new files. See here
Unfortunately, more than my files got added and I suspect that it's the other files that are problematic...

@jepler
Copy link
Member

jepler commented Nov 4, 2021

Based on the error message, I tried making the following edit down in nvm.toml and the error seems to be resolved:

diff --git a/flash/puya/P25Q16H.toml b/flash/puya/P25Q16H.toml
index e4fd193..d7c6903 100644
--- a/flash/puya/P25Q16H.toml
+++ b/flash/puya/P25Q16H.toml
@@ -3,7 +3,6 @@
 # This config is still untested.
 total_size = 0x200000 # 2 MiB # Page 17
 capacity = 0x15 
-manufacturer_id = 0x85 #  Page 49
 write_status_register_split = false
 01_continuous_status_write = true # page 21
 e7_quad_word_read = false # couldn't find in page 21/22

It seems that manufacturer_id was already specified in flash/puya/puya.html, though I don't know why redundantly specifying it should be an error. @tannewt?

Is there some kind of quality check needed in nvm.toml to detect problems, at least that a script 'like' gen_nvm_devices can succeed.

@jpconstantineau
Copy link
Author

@jepler There is already a PR in the other repo that should resolve this: adafruit/nvm.toml#7

@jpconstantineau
Copy link
Author

Apart from testing on the hardware itself, this PR is pretty much ready.
MengDu from Seeed on discord indicated that supply is tight right now. Getting some hardware for testing might take a while.

There are some out there right now (Zack Freedman's latest keyboard uses one). Do we get it out now and wait for people to load them up and let us know of any issues or do we wait to merge? Let me know and I'll update the WIP title...

@dhalbert
Copy link
Collaborator

dhalbert commented Nov 4, 2021

If you can get anyone to see if it loads and runs, with CIRCUITPY working, that would be great. The only failure points I see would be the flash definition, and the pin assignments. The latter can be triple-checked, but the former really needs a test with a real board.

@jpconstantineau
Copy link
Author

Thanks Dan. That's my impression too (pins can be triple-checked but testing with flash can only be done on real hardware). I messaged MengDu to see if they have someone who could load it on their side. I'll want to test it myself as this is the same format as the original Xiao and the QT PY(s) and these are all boards that can be used with my basic macropad/encoder. Having the same pin definition helps in keeping the python code to be the same across all boards...

@jpconstantineau
Copy link
Author

Brief update on this: Seeed is still waiting on stock before one can be shipped to me for testing.

@prplz
Copy link

prplz commented Dec 3, 2021

I received my board yesterday and it runs this PR fine. Interestingly, the pi pico build also works fine.

@jpconstantineau
Copy link
Author

@prplz Thanks for the update. I am still waiting for mine.
@tannewt Removing the WIP from the title. Will press the "Ready for review button" shortly...

@jpconstantineau jpconstantineau changed the title WIP: New Board - Seeeduino XIAO RP2040 Add New Board - Seeeduino XIAO RP2040 Dec 3, 2021
@jpconstantineau jpconstantineau marked this pull request as ready for review December 3, 2021 22:33
@prplz
Copy link

prplz commented Dec 3, 2021

Perhaps you should include the neopixel library?

@jpconstantineau
Copy link
Author

@prplz Does it have a neopixel on board? (Guess so: GPIO12) That's something we can add easily. However, it is normal for including it in the frozen libraries?

@prplz
Copy link

prplz commented Dec 4, 2021

I'm unsure, I see some with onboard neopixel that include it, but also some that don't.

@prplz
Copy link

prplz commented Dec 4, 2021

Just checked to be sure, and the flash command RDID returns 85 60 15 as the datasheet says it should.

@tannewt
Copy link
Member

tannewt commented Dec 6, 2021

I don't suggest freezing in libraries unless you need to save RAM later. The RP2040 has plenty, so I'd leave the neopixel library out.

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! This will be in 7.2.0

@tannewt tannewt merged commit 309faee into adafruit:main Dec 6, 2021
@jpconstantineau jpconstantineau deleted the seeduino-xiao-rp2040 branch December 10, 2021 05:04
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.

5 participants