MicroPython and/or CircuitPython support?

Will the MicroMod platform support MicroPython? I am particularly interested in the SAMD50 processor but the others would be just as interesting.

Hi! It shouldn’t be hard to add SAMD51 MicroMod support to CircuitPython because we already have SAMD51 support. The tutorial to add a new board for it is here: https://learn.adafruit.com/how-to-add-a … cuitpython

The Artemis and ESP32 chips are not supported by CircuitPython because they both lack native USB support. This prevents the USB storage device functionality that people expect with CircuitPython.

Thank you for the link. I prefer MicroPython but CircuitPython is a good alternative as a derivative.

After receiving the development board and SAMD51 processor, I will give it a go and report back here.

Hey! I am currently working on Circuity Python support. I guess it would be more accurate to say that I’m about 90% of the way through and will be able to get some version of it released by the end of the week at the latest ( I do still have other priorities). I’ll update here when it’s finished!

@wonder_boom feel free to email me, scott@adafruit.com, if you have any questions about CircuitPython.

Just posting to follow the conversation.

I ordered one of the SAMD51 processors and the ATP carrier. If you figure out instructions for flashing with either of Micro Python or Circuit Python, I’d be happy to try it out and report back.

Any update on this by chance? My boards came in so I’m eager to try whatever Python workflows are available :slight_smile:

It’s been a few months - was also wondering if anyone has come up with a build definition for MicroPython on the SAMD51 MicroMod.

Thanks!

The SAMD51 still hasn’t been added. The nRF52840 has been added though and is a good example on what needs to be done: https://github.com/adafruit/circuitpython/pull/4350 It should have all of the pin naming for micromod started.

I have added a PR to add the MicroMod RP2040, based on the MicroMod definitions nRF52840, which are now live in CircuitPython 6.2.0.

https://github.com/adafruit/circuitpython/pull/4625

I’m waiting on confirmation of the Sparkfun USB PID for this board, and then it should get merged in.

My PR has been accepted, so hopefully the MicroMod will show up in a CircuitPython release in the near future.

.

MicroMod RP2040 support is available in CircuitPython with release 6.3.0. https://blog.adafruit.com/2021/06/01/ci … -released/

I’ve got a branch to add the MicroMod SAMD51 now, just waiting on a USB PID from Sparkfun so I can submit the PR.

I’m not 100% certain but I think it’s the following:

vid.0=0x1B4F

pid.0=0x0020

vid.1=0x1B4F

pid.1=0xF020

My guess is one set is for a bootloader and the other is for the firmware but I’m not sure.

Hope this helps!

TS-Chris:
I’m not 100% certain but I think it’s the following:

vid.0=0x1B4F

pid.0=0x0020

vid.1=0x1B4F

pid.1=0xF020

My guess is one set is for a bootloader and the other is for the firmware but I’m not sure.

Hope this helps!

Thanks, TS-Chris. 0x0020 seems likely, since the PID for the nRFs seem to start with 0x021.

FYI, I just submitted a PR to add support for SparkFun STM32 MicroMod Processor board to micropython:

https://github.com/micropython/micropython/pull/7527

I’d appreciate any review/feedback on the PR!

Quick update on support for the STM32 MicroMod board. The PR mentioned above was merged in https://github.com/micropython/micropyt … ffbd37a6d3 so you should now be able to build & deploy the firmware for this board by checking out the micropython repo and running:

make -C ports/stm32/ BOARD=SPARKFUN_MICROMOD_STM32 deploy
```.

I also pushed up a work-in-progress PR for CircuitPython support at [https://github.com/adafruit/circuitpython/pull/5060](https://github.com/adafruit/circuitpython/pull/5060). You should be able to test it out by checking out that PR and running:

make -C ports/stm/ BOARD=sparkfun_stm32f405_micromod flash

Hi CDWilson,

Thanks for developing this port.

I was able to build it and install it on a board. However, I’m having issues getting I2C working with various carrier boards.

Can you tell me if you’re able to do a basic scan against any generic QWIIC I2C sensors?

I checked the pinout diagrams, and mpconfigboard.h and pins.csv looks like they match the schematic.

Thanks for reading!

I think I accidentally swapped the I2C1 vs. I2C2 peripheral assignments… Let me know if this patch fixes the issue and I’ll work on getting a PR submitted.

diff --git a/ports/stm32/boards/SPARKFUN_MICROMOD_STM32/mpconfigboard.h b/ports/stm32/boards/SPARKFUN_MICROMOD_STM32/mpconfigboard.h
index 0c451a4db..dc7b7b32e 100644
--- a/ports/stm32/boards/SPARKFUN_MICROMOD_STM32/mpconfigboard.h
+++ b/ports/stm32/boards/SPARKFUN_MICROMOD_STM32/mpconfigboard.h
@@ -73,15 +73,15 @@ extern struct _spi_bdev_t spi_bdev;
 #define MICROPY_HW_CAN1_TX (pin_B9)
 #define MICROPY_HW_CAN1_RX (pin_B8)
 
-// I2C1 config (MicroMod I2C)
-#define MICROPY_HW_I2C1_NAME "I2C"
-#define MICROPY_HW_I2C1_SCL (pin_B10)
-#define MICROPY_HW_I2C1_SDA (pin_B11)
-
-// I2C2 config (MicroMod I2C1)
-#define MICROPY_HW_I2C2_NAME "I2C1"
-#define MICROPY_HW_I2C2_SCL (pin_B6)
-#define MICROPY_HW_I2C2_SDA (pin_B7)
+// I2C2 config (MicroMod I2C)
+#define MICROPY_HW_I2C2_NAME "I2C"
+#define MICROPY_HW_I2C2_SCL (pin_B10)
+#define MICROPY_HW_I2C2_SDA (pin_B11)
+
+// I2C1 config (MicroMod I2C1)
+#define MICROPY_HW_I2C1_NAME "I2C1"
+#define MICROPY_HW_I2C1_SCL (pin_B6)
+#define MICROPY_HW_I2C1_SDA (pin_B7)
 
 // SPI1 config (MicroMod SPI)
 #define MICROPY_HW_SPI1_NAME "SPI"

cdwilson:
I think I accidentally swapped the I2C1 vs. I2C2 peripheral assignments… Let me know if this patch fixes the issue and I’ll work on getting a PR submitted.

Hi Chris,

Thanks again for this - I can confirm the fix allowed me two scan using my SFE ATP carrier board on both buses connected to a Qwiic board.

from machine import I2C

i2c = I2C(1)

i2c.scan()

[35]

i2c2 = I2C(2)

i2c2.scan()

[73]

FYI, here’s a link to the PR: https://github.com/micropython/micropython/pull/8372