Skip to content

Add basic SAM E54 support and SAM E54 Xplained board #3046

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

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

jepler
Copy link

@jepler jepler commented Jun 18, 2020

Few peripherals are actually tested. However, USB, I2C and GPIO seem to work.

The default SPI, I2C, and UART are the ones on the EXT2 header. This is arbitrary, but the I2C on this connector is shared with the on-board I2C devices and the PCC header, making it the most versatile.

Only 16MiB of the 32MiB (256Mbit) flash is supported, due to the supervisor code for flash assuming 24-bit addresses.

This depends on adafruit/samd-peripherals#33 and adafruit/asf4#35 which are in draft status at the moment. I figure this PR is likely to be a better place to discuss the issues before moving them out of draft status.

The main reason I'm working on this is because this board has an SD card slot wired for SDIO, so it will resolve any questions about correct wiring in #2863.

Adafruit CircuitPython 5.4.0-beta.1-19-gce8ebc779-dirty on 2020-06-18; SAM E54 Xplained Pro with same54p20
>>> import board
>>> i2c = board.I2C()
>>> i2c.try_lock()
True
>>> i2c.scan()
[40, 54, 86, 94]

@jepler jepler changed the title Add basic SAM E51 support and SAM E4 Xplained board Add basic SAM E4 support and SAM E4 Xplained board Jun 18, 2020
@jepler jepler changed the title Add basic SAM E4 support and SAM E4 Xplained board Add basic SAM E4 support and SAM E54 Xplained board Jun 18, 2020
@dhalbert
Copy link
Collaborator

Most pins are silkscreened with the "PX00" style, so the board module only includes the small number that are screened differently, mostly on the PCC header. I can fill out the board module with these names if desired.

I suggest filling board with all the pins in Px00 style,instead of relying on microcontroller.pin. I did this for the nrf dev boards like pca10056, so that all the silk-screened pins have a name under board, for consistency.

@tannewt tannewt requested a review from dhalbert June 19, 2020 18:39
@jepler jepler marked this pull request as ready for review June 19, 2020 20:20
@jepler jepler changed the title Add basic SAM E4 support and SAM E54 Xplained board Add basic SAM E54 support and SAM E54 Xplained board Jun 19, 2020
@jepler
Copy link
Author

jepler commented Jun 21, 2020

Initially I wrote this so that SAMD51 and SAME54 preprocessor defines were both defined for the new board. This is tricky because when you write the #if blocks to do something different, you have to put the SAME54 block first, so I think it's not a good idea.

I'm rewriting it so that SAMx5FAM is defined for both systems, and then just one of SAMD51 or SAME54 is defined. Thoughts @dhalbert @tannewt ? Especially if you want to intervene on the naming, sooner is better. This'll require additional changes in peripherals submodule too.

@dhalbert
Copy link
Collaborator

I'm rewriting it so that SAMx5FAM is defined for both systems, and then just one of SAMD51 or SAME54 is defined. Thoughts @dhalbert @tannewt ? Especially if you want to intervene on the naming, sooner is better. This'll require additional changes in peripherals submodule too.

Discussion is in adafruit/samd-peripherals#33

jepler added 2 commits June 23, 2020 10:41
This introduces the new macro SAM_D5X_E5X.  This is mostly the same
as SAMD51 before, except in a few places where a special case for
SAME54 is required
Few peripherals are actually tested.  However, USB, I2C and GPIO seem to work.

Most pins are silkscreened with the "PX00" style, so the board module
only includes the small number that are screened differently.

The default SPI, I2C, and UART are the ones on the EXT2 header.  This is
arbitrary, but the I2C on this connector is shared with the on-board I2C
devices and the PCC header, making it the most versatile.
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Looks good!

Is this all ready or does it need submodules samd-peripherals and/or asf4 updated?

@jepler
Copy link
Author

jepler commented Jun 25, 2020

I verified that the asf4 and peripherals submodule commits are within the circuitpython and master branches of those repos respectively.

@jepler jepler merged commit 076a96c into adafruit:main Jun 25, 2020
@jepler jepler deleted the same51 branch November 3, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants