Skip to content

Sparkfun micromod samd51#4852

Merged
jepler merged 7 commits into
adafruit:mainfrom
stonehippo:sparkfun-micromod-samd51
Jun 3, 2021
Merged

Sparkfun micromod samd51#4852
jepler merged 7 commits into
adafruit:mainfrom
stonehippo:sparkfun-micromod-samd51

Conversation

@stonehippo

Copy link
Copy Markdown

Added support for the Sparkfun MicroMod SAMD51 board. Board follows a pin layout similar to other MicroMod boards, like the MM RP2040 and MM nRF52840 boards already supported by CircuitPython. This board definition was derived from the Sparkfun SAMD51 Thing+ support, with pin mapping and external flash changes.

I have confirmed the vendor USB PID with Sparkfun.

I’d love a code review. :)


// I2C2
{ MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_PA13) },
{ MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_PA12) },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't know if it's the source of the build errors but you've got MP_QSTR_SCL1 again here, it's up at line 61 as well.

@@ -0,0 +1,33 @@
#define MICROPY_HW_BOARD_NAME "SparkFun Thing Plus - SAMD51"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The name of the board needs corrected.

{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_PA16) },

{ MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_PB18) },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The MicroMod board uses the 64-pin SAMD51J20A which doesn't expose a PB18 pin - it doesn't appear until the 100-pin variant.
Removing this line gets it to build for me locally. I don't have one to test with so you'll need to check it works.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, it should have been PA18

@lesamouraipourpre lesamouraipourpre left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That builds for me locally now

make -j8 BOARD=sparkfun_samd51_micromod
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
{}
QSTR updated

463884 bytes used, 560116 bytes free in flash firmware space out of 1024000 bytes (1000.0kB).
35248 bytes used, 226896 bytes free in ram for stack and heap out of 262144 bytes (256.0kB).

Converting to uf2, output size: 928256, start address: 0x4000
Wrote 928256 bytes to build-sparkfun_samd51_micromod/firmware.uf2

Hopefully Github Actions will confirm when it decides to run.

I've not checked the mapping of the pins and I don't have one to test against but it looks good to me.

@stonehippo

Copy link
Copy Markdown
Author

@lesamouraipourpre Looks like CI is happy now. I’ve confirmed the pins against the schematic, and I’ll be testing on hardware, too.

@jepler jepler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great, thank you! This seems good to merge if the CI likes it too.

@jepler jepler merged commit c7df5e9 into adafruit:main Jun 3, 2021
@stonehippo stonehippo deleted the sparkfun-micromod-samd51 branch June 3, 2021 13:14
@jepler

jepler commented Jun 3, 2021

Copy link
Copy Markdown

@stonehippo

Copy link
Copy Markdown
Author

@jepler will do!

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