-
Notifications
You must be signed in to change notification settings - Fork 8.6k
boards: Add support for the Serpente Board #26960
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
Conversation
4db0945 to
2d66527
Compare
ioannisg
left a comment
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.
overall looks fine to me
nzmichaelh
left a comment
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.
Nice! Also check out the new seeeduino_xiao config for a more recent SAMD21 port.
|
Thanks for the pointers to seeeduino_xiao, I'll have a look. |
Best practice is to amend / fixup and then do a force push. Make sure you resolve the comments first though, else Github seems to lose them. |
|
I'm a bit lost regarding PWM. Results in errors during the build |
|
PWM is now working, however the output is inverted (the LED on the Serpente is ACTIVE_LOW which is currently not supported by the DTS for SAM0-TCC-PWM). I'm working on another PR to add this feature. |
Sounds good, I was about to do the same. Let me know if you run out of time and I can take over the PWM change. |
|
The Serpente board has a very limited pin count, but the pins are well chosen. It is possible to have 2UART or 1UART+1SPI or 1I2C+1SPI or 1UART+1I2C and so on (see notes in schematics). What is the best practice in Zephyr for the default sercom definition in the board DTS? The options I was thinking about are:
Are there any better ways I missed? Which one do you prefer? |
vanwinkeljan
left a comment
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.
Please move serpente.overlay files in samples and tests to a separate commit as it has nothing to do with the commit boards: Add support for the Serpente Board
The tests and samples won't compile without warning (buildkite will fail), if I remove the overlay files. I would also have to remove the |
It was just a request to move the overlays to a separate commit, not a separate PR (so one commit to introduce the board and then one commit to add the overlays) |
Sorry, I misunderstood. I just splittet the commit into two. |
|
How do you want me to proceed with the failing build_all tests? The serpente only supports 2 different interfaces out of [UART, SPI, I2C] simultaneously, but some tests use all 3 of them. What is the best practice in this scenario? |
You could blacklist the board for the test that require the 3 interfaces. Have a look at |
|
I guess I messed up the review resolving. Are there still any changes pending that I missed? |
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.
Why aren't all these overlay settings in the main board dts? I know the sercom can be configured as i2c or uart, but once you design a board will you really switch between them?
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.
I was debating this myself a few days ago. In the end, I choose to follow the official pinout diagram and GPIO configuration of the Serpente.
My justification for this was, that the Serpente is a quite small development/prototyping board without a specific use-case in mind. It has just a few pins which provide maximum flexibility - these exact pins are specifically choose, because they provide the most diverse config options (from PWM, touch sensitive inputs, i2c, spi to uart and so on - with only 6 pins!). I didn't want to force a default configuration on the user, which might be unexpected since the official documentation does not describe any default configs.
On the other hand I totally understand that cluttering the code with overlay files is not perfect at all. If you prefer a default configuration of the Serpente in Zephyr, maybe @arturo182 can suggest one?
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.
@elexx put this perfectly, the idea is to not force the user into any specific configuration. TBH, it's even hard to choose which should be the default cause it totally depends on the use-case. If possible, I'd prefer we keep it as flexible as we can.
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.
Setting these in the board dts doesn't lock a user into a specific configuration, as you can still override them in an application overlay if desired. I'm not keen on having so many overlays for this board. Can you at least put the console uart in the board dts?
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 for your feedback. I just added a default configuration for the zephyr console and amended the changes to my last commit.
Because I was not able to find this in the documentation or in some other SAMDx based board dts: Is it possible to use the USB connection as zephyr console by default? Without using a sercom at all? I guess this would be the preferred way for the Serpente, because it frees up 2 pins. And imho it also reduces the entry barrier for people new to Zephyr, because only one cable and no additional hardware is required to get started with Zephyr and some quick printk/log debugging.
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.
I'm not sure if there are any boards that currently do this, but yes it should be possible. I suggest we go ahead and merge this PR, then you can submit a follow-up PR
|
@nzmichaelh I'm sorry, but somewhere on the way to finalize this PR it seems like I forgot to resolve a change request from you. Is there still anything you want me to fix in this PR? Aside from that, is there anything else I can do to help finish up this PR? |
|
@nzmichaelh please revisit |
|
@nzmichaelh just a friendly reminder that this PR still needs your attention :-) |
8a60086 to
09e49a4
Compare
The Serpente Boards are small low-cost Atmel SAMD21 based development boards by @arturo182 Signed-off-by: Alexander Falb <fal3xx@gmail.com>
Add the supported features section to serpente.yaml and overlay files to the corresponding tests and samples. Signed-off-by: Alexander Falb <fal3xx@gmail.com>
09e49a4 to
5c20552
Compare
no response after multiple pings
The Serpente Boards are small low-cost Atmel SAMD21 based development boards by @arturo182
Signed-off-by: Alexander Falb fal3xx@gmail.com