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

General update itsybitsy m0 #559

Merged
merged 17 commits into from
Feb 17, 2022

Conversation

javiser
Copy link
Contributor

@javiser javiser commented Dec 28, 2021

Summary

The goal of this PR is to bring the ItsyBitsy M0 (which is a Tier 2 BSP) to the same "maturity" level of a Tier 1 BSP. Instead of just bumping a couple of dependencies as done with other boards (i.e. for the ItsyBitsy M4 in #547, which by the way was quite useful as reference for this PR), my proposal is to take advantage of the fact that the ItsyBitsy M0 is internally pretty similar to the Feather M0, which is Tier 1. So I copied the current code of the Feather M0 and made the changes necessary to reflect the HW differences. I also copied the examples from the Feather M0 and adjusted them as necessary, and kept the existing examples where necessary or meaningful. By doing do I hope that maintaining this board as Tier 2 BSP will much easier, as keeping an eye on the Feather M0 and implementing deltas will be much easier. The main and relevant differences between the boards are:

  • ItsyBitsy M0 does not have an external crystal clock, only internal
  • ItsyBitsy M0 has a built-in DOTStar LED, not a neopixel (which is only available in the Feather M0 Express variant)
  • ItsyBitsy M0 has a built-in SPI flash as the Feather M0 Express variant, but on other internal pins
  • There are not any variantes on the ItsyBitsy M0 (i.e. RMF or Adalogger)
  • Different number of pins and partly different capabilities (see comments in pins structure for details)

What has been done in this PR:

  • Copied feather_m0 as itsybitsy_m0 as starting point
  • Adjusted pins, renamed, removed and added. Also adding hints and documentation from the official Adafruit learn guide (https://learn.adafruit.com/introducing-itsy-bitsy-m0/pinouts)
  • Adjusted existing examples to work, or in some cases replaced to be equivalent to the feather m0 examples
  • Dotstar example renamed to dotstar_rainbow and added a new dotstar_flashing similar to the one from itsybitsy_m4 board
  • Adjusted Cargo.toml correspondingly

💡 Hint: It might be useful to compare the contents of the feather_m0 folder with this new version of itsybitsy_m0 as well, as this might show the changes of this PR better than the before-after comparison of the itsybitsy_m0 files.

What should be done yet:

  • Somebody help me test all ssd1306 examples with a real display
  • Somebody help me test the new adc.rs, clock.rs, dmac.rs and uart.rs examples copied from feather_m0 (even if I am pretty sure that they should work just as fine as for the Feather M0)

Checklist

  • CHANGELOG.md for the BSP or HAL updated
  • All new or modified code is well documented, especially public items
  • No new warnings or clippy suggestions have been introduced (see CI or check locally)

@javiser javiser marked this pull request as ready for review December 28, 2021 16:44
@bradleyharden
Copy link
Contributor

If this is mostly just a copy and rework of feather_m0, then I'm good with it. We just need to test it on hardware to be sure there are no lingering bugs.

@javiser
Copy link
Contributor Author

javiser commented Jan 8, 2022

If this is mostly just a copy and rework of feather_m0, then I'm good with it. We just need to test it on hardware to be sure there are no lingering bugs.

That's right @bradleyharden, this is a copy and rework of feather_m0. I tested many of the examples, but for some I was missing either the know-how or the equipment, that's why I left two open tasks in this PR. I do know that the SPI is working because I got a display with a ST7789 to work, as well as a rotary encoder and some RGB LEDs on other pins. So I definitely would appreciate some help here to confirm that I did not break anything here.

boards/itsybitsy_m0/Cargo.toml Outdated Show resolved Hide resolved
boards/itsybitsy_m0/Cargo.toml Show resolved Hide resolved
@jbeaurivage
Copy link
Contributor

@javiser, I just confirmed that the pin/sercom definitions are correct to the hardware.

@javiser
Copy link
Contributor Author

javiser commented Feb 15, 2022

Ok, @jbeaurivage, I finally found some time and resynchronized everything with the current master. I still would like to hook up the board and do a couple of basic tests to see if the things are working yet fine, but in the mean time, if you are interested, you can finish the review. We will also need to decide what to do with the above open tasks. Either somebody helps me there with that or we need to "merge at risk and hope for the best".

@jbeaurivage
Copy link
Contributor

Thanks @javiser.

I'm pretty confident the adc, dmac, clocks and uart examples work as is, since they're copied from feather_m0. The clock and dmac examples are purely "internal" (as in they don't depend on external comms or peripherals apart from USB).

I think you'll have a hard time finding someone here with both an itsybitsy m0 and an ssd1306 to test.

Overall I'm comfortable merging whenever you complete your tests.

@javiser
Copy link
Contributor Author

javiser commented Feb 17, 2022

So I finally managed to flash some of the tests, but none of the ones with external periphery and I could not test any of the tests I requested help for anyways. Based on your previous comment, I have decided to remove the corresponding tasks. I think that this PR can be merged now, it is up to you now @jbeaurivage . Thanks again for your help!

@jbeaurivage jbeaurivage merged commit 5969c36 into atsamd-rs:master Feb 17, 2022
@javiser
Copy link
Contributor Author

javiser commented Feb 17, 2022

Thanks!

@javiser javiser deleted the general-update-itsybitsy_m0 branch February 17, 2022 21:50
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.

3 participants