Browse Source
OCOTP_Init() has been removed from mphalport.c. The library files are missing for the MIMXRT1015, and for just reading the OCOTP the Init is not required.pull/8401/head
robert-hh
3 years ago
committed by
Damien George
10 changed files with 365 additions and 2 deletions
@ -0,0 +1,38 @@ |
|||
/* Memory configuration */ |
|||
#if defined MICROPY_HW_FLASH_RESERVED |
|||
reserved_size = MICROPY_HW_FLASH_RESERVED; |
|||
#endif |
|||
|
|||
#if MICROPY_HW_FLASH_TYPE == qspi_nor |
|||
flash_start = 0x60000000; |
|||
#else |
|||
#error Unknown MICROPY_HW_FLASH_TYPE |
|||
#endif |
|||
flash_size = MICROPY_HW_FLASH_SIZE; |
|||
flash_end = DEFINED(reserved_size) ? ((flash_start) + (flash_size - reserved_size)) : ((flash_start) + (flash_size)); |
|||
flash_config_start = flash_start; |
|||
flash_config_size = 0x00001000; |
|||
ivt_start = flash_start + 0x00001000; |
|||
ivt_size = 0x00001000; |
|||
interrupts_start = flash_start + 0x00002000; |
|||
interrupts_size = 0x00000400; |
|||
text_start = flash_start + 0x00002400; |
|||
vfs_start = flash_start + 0x00100000; |
|||
text_size = ((vfs_start) - (text_start)); |
|||
vfs_size = ((flash_end) - (vfs_start)); |
|||
itcm_start = 0x00000000; |
|||
itcm_size = 0x00008000; |
|||
dtcm_start = 0x20000000; |
|||
dtcm_size = 0x00008000; |
|||
ocrm_start = 0x20200000; |
|||
ocrm_size = 0x00010000; |
|||
|
|||
/* 24kiB stack. */ |
|||
__stack_size__ = 0x5000; |
|||
_estack = __StackTop; |
|||
_sstack = __StackLimit; |
|||
|
|||
/* Use second OCRAM bank for GC heap. */ |
|||
/* Use all OCRAM for the GC heap. */ |
|||
_gc_heap_start = ORIGIN(m_ocrm); |
|||
_gc_heap_end = ORIGIN(m_ocrm) + LENGTH(m_ocrm); |
@ -0,0 +1,23 @@ |
|||
{ |
|||
"deploy": [ |
|||
"../deploy_mimxrt.md" |
|||
], |
|||
"docs": "", |
|||
"features": [ |
|||
"MicroSD", |
|||
"MicroUSB", |
|||
"Microphone", |
|||
"AudioCodec", |
|||
"CAN", |
|||
"OpenSDA", |
|||
"JLink" |
|||
], |
|||
"images": [ |
|||
"MIMXRT1015-EVK-TOP.jpg" |
|||
], |
|||
"mcu": "mimxrt", |
|||
"product": "MIMXRT1015_EVK", |
|||
"thumbnail": "", |
|||
"url": "https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1015-evaluation-kit:MIMXRT1015-EVK", |
|||
"vendor": "NXP" |
|||
} |
@ -0,0 +1,107 @@ |
|||
/*
|
|||
* Copyright 2018-2019 NXP |
|||
* All rights reserved. |
|||
* |
|||
* SPDX-License-Identifier: BSD-3-Clause |
|||
*/ |
|||
|
|||
#ifndef _CLOCK_CONFIG_H_ |
|||
#define _CLOCK_CONFIG_H_ |
|||
|
|||
#include "fsl_common.h" |
|||
|
|||
/*******************************************************************************
|
|||
* Definitions |
|||
******************************************************************************/ |
|||
#define BOARD_XTAL0_CLK_HZ 24000000U /*!< Board xtal0 frequency in Hz */ |
|||
|
|||
#define BOARD_XTAL32K_CLK_HZ 32768U /*!< Board xtal32k frequency in Hz */ |
|||
/*******************************************************************************
|
|||
************************ BOARD_InitBootClocks function ************************ |
|||
******************************************************************************/ |
|||
|
|||
#if defined(__cplusplus) |
|||
extern "C" { |
|||
#endif /* __cplusplus*/ |
|||
|
|||
/*!
|
|||
* @brief This function executes default configuration of clocks. |
|||
* |
|||
*/ |
|||
void BOARD_InitBootClocks(void); |
|||
|
|||
#if defined(__cplusplus) |
|||
} |
|||
#endif /* __cplusplus*/ |
|||
|
|||
/*******************************************************************************
|
|||
********************** Configuration BOARD_BootClockRUN *********************** |
|||
******************************************************************************/ |
|||
/*******************************************************************************
|
|||
* Definitions for BOARD_BootClockRUN configuration |
|||
******************************************************************************/ |
|||
#define BOARD_BOOTCLOCKRUN_CORE_CLOCK 500000000U /*!< Core clock frequency: 500000000Hz */ |
|||
|
|||
/* Clock outputs (values are in Hz): */ |
|||
#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 500000000UL |
|||
#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL |
|||
#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL |
|||
#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL |
|||
#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL |
|||
#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL |
|||
#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL |
|||
#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL |
|||
#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 125000000UL |
|||
#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL |
|||
#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL |
|||
#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL |
|||
#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL |
|||
#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL |
|||
#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL |
|||
#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL |
|||
#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL |
|||
#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL |
|||
#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 117333333UL |
|||
#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL |
|||
#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 0UL |
|||
|
|||
/*! @brief Usb1 PLL set for BOARD_BootClockRUN configuration.
|
|||
*/ |
|||
extern const clock_usb_pll_config_t usb1PllConfig_BOARD_BootClockRUN; |
|||
/*! @brief Sys PLL for BOARD_BootClockRUN configuration.
|
|||
*/ |
|||
extern const clock_sys_pll_config_t sysPllConfig_BOARD_BootClockRUN; |
|||
/*! @brief Enet PLL set for BOARD_BootClockRUN configuration.
|
|||
*/ |
|||
extern const clock_enet_pll_config_t enetPllConfig_BOARD_BootClockRUN; |
|||
|
|||
/*******************************************************************************
|
|||
* API for BOARD_BootClockRUN configuration |
|||
******************************************************************************/ |
|||
#if defined(__cplusplus) |
|||
extern "C" { |
|||
#endif /* __cplusplus*/ |
|||
|
|||
/*!
|
|||
* @brief This function executes configuration of clocks. |
|||
* |
|||
*/ |
|||
void BOARD_BootClockRUN(void); |
|||
|
|||
#if defined(__cplusplus) |
|||
} |
|||
#endif /* __cplusplus*/ |
|||
|
|||
#endif /* _CLOCK_CONFIG_H_ */ |
@ -0,0 +1,84 @@ |
|||
#define MICROPY_HW_BOARD_NAME "i.MX RT1015 EVK" |
|||
#define MICROPY_HW_MCU_NAME "MIMXRT1015DAF5A" |
|||
|
|||
// i.MX RT1015 EVK has 3 board LED
|
|||
// Todo: think about replacing the define with searching in the generated pins?
|
|||
#define MICROPY_HW_LED1_PIN (pin_GPIO_SD_B1_00) |
|||
#define MICROPY_HW_LED2_PIN (pin_GPIO_SD_B1_01) |
|||
#define MICROPY_HW_LED3_PIN (pin_GPIO_SD_B1_02) |
|||
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_low(pin)) |
|||
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_high(pin)) |
|||
|
|||
#define MICROPY_HW_NUM_PIN_IRQS (3 * 32) |
|||
|
|||
// Define mapping logical UART # to hardware UART #
|
|||
// RX/TX HW-UART Logical UART
|
|||
// DEBUG USB LPUART1 -> 0
|
|||
// D3/D5 LPUART1
|
|||
// D0/D1 LPUART2 -> 1
|
|||
// D6/D9 LPUART3 -> 2
|
|||
// A0/A1 LPUART4 -> 5
|
|||
|
|||
#define MICROPY_HW_UART_NUM (sizeof(uart_index_table) / sizeof(uart_index_table)[0]) |
|||
#define MICROPY_HW_UART_INDEX { 1, 4, 3 } |
|||
|
|||
#define IOMUX_TABLE_UART \ |
|||
{ IOMUXC_GPIO_AD_B0_06_LPUART1_TX }, { IOMUXC_GPIO_AD_B0_07_LPUART1_RX }, \ |
|||
{ 0 }, { 0 }, \ |
|||
{ IOMUXC_GPIO_AD_B0_14_LPUART3_TX }, { IOMUXC_GPIO_AD_B0_15_LPUART3_RX }, \ |
|||
{ IOMUXC_GPIO_EMC_32_LPUART4_TX }, { IOMUXC_GPIO_EMC_33_LPUART4_RX }, \ |
|||
|
|||
#define MICROPY_HW_SPI_INDEX { 1 } |
|||
|
|||
#define IOMUX_TABLE_SPI \ |
|||
{ IOMUXC_GPIO_AD_B0_10_LPSPI1_SCK }, { IOMUXC_GPIO_AD_B0_11_LPSPI1_PCS0 }, \ |
|||
{ IOMUXC_GPIO_AD_B0_12_LPSPI1_SDO }, { IOMUXC_GPIO_AD_B0_13_LPSPI1_SDI }, \ |
|||
{ 0 } |
|||
|
|||
#define DMA_REQ_SRC_RX { 0, kDmaRequestMuxLPSPI1Rx, kDmaRequestMuxLPSPI2Rx } |
|||
|
|||
#define DMA_REQ_SRC_TX { 0, kDmaRequestMuxLPSPI1Tx, kDmaRequestMuxLPSPI2Tx } |
|||
|
|||
// Define mapping hardware I2C # to logical I2C #
|
|||
// SDA/SCL HW-I2C Logical I2C
|
|||
// D14/D15 LPI2C4 -> 0
|
|||
// A4/A5 LPI2C1 -> 1
|
|||
// D0/D1 LPI2C2 -> 2
|
|||
|
|||
#define MICROPY_HW_I2C_INDEX { 1, 2 } |
|||
|
|||
#define IOMUX_TABLE_I2C \ |
|||
{ IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL }, { IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA }, \ |
|||
{ IOMUXC_GPIO_EMC_19_LPI2C2_SCL }, { IOMUXC_GPIO_EMC_18_LPI2C2_SDA }, |
|||
|
|||
#define MICROPY_PY_MACHINE_I2S (1) |
|||
#define MICROPY_HW_I2S_NUM (1) |
|||
#define I2S_CLOCK_MUX { 0, kCLOCK_Sai1Mux, kCLOCK_Sai2Mux } |
|||
#define I2S_CLOCK_PRE_DIV { 0, kCLOCK_Sai1PreDiv, kCLOCK_Sai2PreDiv } |
|||
#define I2S_CLOCK_DIV { 0, kCLOCK_Sai1Div, kCLOCK_Sai2Div } |
|||
#define I2S_IOMUXC_GPR_MODE { 0, kIOMUXC_GPR_SAI1MClkOutputDir, kIOMUXC_GPR_SAI2MClkOutputDir } |
|||
#define I2S_DMA_REQ_SRC_RX { 0, kDmaRequestMuxSai1Rx, kDmaRequestMuxSai2Rx } |
|||
#define I2S_DMA_REQ_SRC_TX { 0, kDmaRequestMuxSai1Tx, kDmaRequestMuxSai2Tx } |
|||
|
|||
#define I2S_GPIO(_hwid, _fn, _mode, _pin, _iomux) \ |
|||
{ \ |
|||
.hw_id = _hwid, \ |
|||
.fn = _fn, \ |
|||
.mode = _mode, \ |
|||
.name = MP_QSTR_##_pin, \ |
|||
.iomux = {_iomux}, \ |
|||
} |
|||
|
|||
#define I2S_GPIO_MAP \ |
|||
{ \ |
|||
I2S_GPIO(1, MCK, TX, GPIO_EMC_20, IOMUXC_GPIO_EMC_20_SAI1_MCLK), \ |
|||
I2S_GPIO(1, SCK, RX, GPIO_EMC_19, IOMUXC_GPIO_EMC_19_SAI1_RX_BCLK), \ |
|||
I2S_GPIO(1, WS, RX, GPIO_EMC_18, IOMUXC_GPIO_EMC_18_SAI1_RX_SYNC), \ |
|||
I2S_GPIO(1, SD, RX, GPIO_EMC_21, IOMUXC_GPIO_EMC_21_SAI1_RX_DATA00), \ |
|||
I2S_GPIO(1, SCK, TX, GPIO_EMC_26, IOMUXC_GPIO_EMC_26_SAI1_TX_BCLK), \ |
|||
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_BOARD_ROOT_POINTERS \ |
|||
struct _machine_i2s_obj_t *machine_i2s_obj[MICROPY_HW_I2S_NUM]; |
@ -0,0 +1,9 @@ |
|||
MCU_SERIES = MIMXRT1015 |
|||
MCU_VARIANT = MIMXRT1015DAF5A |
|||
|
|||
MICROPY_FLOAT_IMPL = single |
|||
MICROPY_PY_MACHINE_SDCARD = 0 |
|||
MICROPY_HW_FLASH_TYPE ?= qspi_nor |
|||
MICROPY_HW_FLASH_SIZE ?= 0x1000000 # 16MB |
|||
|
|||
MICROPY_BOOT_BUFFER_SIZE = (32 * 1024) |
|
Can't render this file because it has a wrong number of fields in line 25.
|
Loading…
Reference in new issue