Skip to content

Commit

Permalink
mimxrt: Add Pin definitions for MIMXRT1010, MINMXRT1015 and Teensy 4.0.
Browse files Browse the repository at this point in the history
For the *_EVK boards the pins are those used by the Adafruit Airlift
shield with one change: The Airlift shield uses by default Pin 5 for
RESET, which is not available at the MIMXRT1010_EVK board. Instead,
Pin 8 is used.
For Teensy 4.0 SPI0 and UART2 pins are used, and Pin(9) for busy,
Pin(6) for reset and Pin(5) for GPIO0. But these can be changed using
the NinaW10 class.

Signed-off-by: robert-hh <robert@hammelrath.com>
  • Loading branch information
robert-hh committed Jul 2, 2023
1 parent 79df245 commit 8e2bd15
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@
I2S_GPIO(1, WS, TX, GPIO_07, IOMUXC_GPIO_07_SAI1_TX_SYNC), \
I2S_GPIO(1, SD, TX, GPIO_04, IOMUXC_GPIO_04_SAI1_TX_DATA00), \
}

#define MICROPY_HW_WIFI_SPI_ID (0)
#define MICROPY_HW_WIFI_SPI_BAUDRATE (8000000)

#define MICROPY_HW_NINA_ACK pin_find(MP_OBJ_NEW_SMALL_INT(7))
#define MICROPY_HW_NINA_CS pin_find(MP_OBJ_NEW_SMALL_INT(10))
#define MICROPY_HW_NINA_RESET pin_find(MP_OBJ_NEW_SMALL_INT(8))
4 changes: 4 additions & 0 deletions ports/mimxrt/boards/MIMXRT1010_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ MICROPY_PY_MACHINE_SDCARD = 0
MICROPY_HW_FLASH_TYPE = qspi_nor_flash
MICROPY_HW_FLASH_SIZE = 0x1000000 # 16MB

MICROPY_PY_NETWORK_NINAW10 ?= 1
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1

JLINK_PATH ?= /media/RT1010-EVK/
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

Expand Down
7 changes: 7 additions & 0 deletions ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,10 @@
I2S_GPIO(1, WS, TX, GPIO_EMC_27, IOMUXC_GPIO_EMC_27_SAI1_TX_SYNC), \
I2S_GPIO(1, SD, TX, GPIO_EMC_25, IOMUXC_GPIO_EMC_25_SAI1_TX_DATA00), \
}

#define MICROPY_HW_WIFI_SPI_ID (0)
#define MICROPY_HW_WIFI_SPI_BAUDRATE (8000000)

#define MICROPY_HW_NINA_ACK pin_find(MP_OBJ_NEW_SMALL_INT(7))
#define MICROPY_HW_NINA_CS pin_find(MP_OBJ_NEW_SMALL_INT(10))
#define MICROPY_HW_NINA_RESET pin_find(MP_OBJ_NEW_SMALL_INT(8))
4 changes: 4 additions & 0 deletions ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ MICROPY_HW_FLASH_TYPE = qspi_nor_flash
MICROPY_HW_FLASH_SIZE = 0x1000000 # 16MB

MICROPY_BOOT_BUFFER_SIZE = (32 * 1024)

MICROPY_PY_NETWORK_NINAW10 ?= 1
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1
7 changes: 7 additions & 0 deletions ports/mimxrt/boards/TEENSY40/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,10 @@
.data2 = { GPIO_SD_B0_04_USDHC1_DATA2 }, \
.data3 = { GPIO_SD_B0_05_USDHC1_DATA3 }, \
}

#define MICROPY_HW_WIFI_SPI_ID (0)
#define MICROPY_HW_WIFI_SPI_BAUDRATE (8000000)

#define MICROPY_HW_NINA_ACK pin_find(MP_OBJ_NEW_SMALL_INT(9))
#define MICROPY_HW_NINA_CS pin_find(MP_OBJ_NEW_SMALL_INT(10))
#define MICROPY_HW_NINA_RESET pin_find(MP_OBJ_NEW_SMALL_INT(6))
4 changes: 4 additions & 0 deletions ports/mimxrt/boards/TEENSY40/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ MICROPY_HW_FLASH_TYPE = qspi_nor_flash
MICROPY_HW_FLASH_SIZE = 0x200000 # 2MB
MICROPY_HW_FLASH_RESERVED ?= 0x1000 # 4KB

MICROPY_PY_NETWORK_NINAW10 ?= 1
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1

deploy: $(BUILD)/firmware.hex
teensy_loader_cli --mcu=imxrt1062 -v -w $<

0 comments on commit 8e2bd15

Please sign in to comment.