NXP MIMXRT1010-EVK
Overview
This is a set of Bridle’s extension to the original Zephyr upstream board MIMXRT1010-EVK with some adaptions and improvement on Kconfig and Devicetree level.
List of extensions
Kconfig
activate self powered USB explicitly and set the maximum of electrical current consumption to 0㎃:
NXP MIMXRT1010-EVK
Kconfig.defconfigconfig USB_SELF_POWERED default y depends on USB_DEVICE_STACK && BOARD_MIMXRT1010_EVK config USB_MAX_POWER default 0 if BOARD_MIMXRT1010_EVK # 0mA (self powered) depends on USB_DEVICE_STACK && BOARD_MIMXRT1010_EVK
change log level and startup delay only in case of use the native USB device port
nxp,ehci
with CDC-ACM UARTzephyr,cdc-acm-uart
as Zephyr console:CONFIG_USB_CDC_ACM_LOG_LEVEL_CHOICE
:=CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF
CONFIG_USB_DEVICE_LOG_LEVEL_CHOICE
:=CONFIG_USB_DEVICE_LOG_LEVEL_ERR
NXP MIMXRT1010-EVK
Kconfig.defconfig# Workaround for not being able to have commas in macro arguments DT_CHOSEN_Z_CONSOLE := zephyr,console DT_COMPAT_Z_CDC_ACM_UART := zephyr,cdc-acm-uart DT_COMPAT_NXP_USB := nxp,ehci # Macros to shorten Kconfig expressions DT_CHOSEN_CONSOLE_NODE := $(dt_chosen_path,$(DT_CHOSEN_Z_CONSOLE)) DT_CHOSEN_CONSOLE_PARENT := $(dt_node_parent,$(DT_CHOSEN_CONSOLE_NODE)) if BOARD_MIMXRT1010_EVK && \ $(dt_chosen_enabled,$(DT_CHOSEN_Z_CONSOLE)) && \ $(dt_compat_on_bus,$(DT_COMPAT_Z_CDC_ACM_UART),usb) && \ $(dt_node_has_compat,$(DT_CHOSEN_CONSOLE_PARENT),$(DT_COMPAT_NXP_USB)) # Logger cannot use itself to log choice USB_CDC_ACM_LOG_LEVEL_CHOICE default USB_CDC_ACM_LOG_LEVEL_OFF depends on LOG endchoice # Set USB log level to error only choice USB_DEVICE_LOG_LEVEL_CHOICE default USB_DEVICE_LOG_LEVEL_ERR depends on LOG endchoice # Wait 4000ms at startup for logging config LOG_PROCESS_THREAD_STARTUP_DELAY_MS default 4000 depends on LOG # Wait 4000ms at startup for USB enumeration on host side config BOOT_DELAY default 4000 endif # zephyr,cdc-acm-uart
Devicetree
set default entries for
model
andcompatible
of the boards:NXP MIMXRT1010-EVK
mimxrt1010_evk.overlay/ { model = "NXP MIMXRT1010-EVK board @ UART Concole"; compatible = "nxp,mimxrt1010", "nxp,mimxrt1010-uartcons"; };
overwrite the Arduino UNO R3 specific edge connecor binding
&arduino_header {...};
with additional closed connections:NXP MIMXRT1010-EVK
arduino_r3_connector.dtsi&arduino_header { gpio-map = <0 0 &gpio1 21 0>, /* A0 */ <1 0 &gpio1 23 0>, /* A1 */ <2 0 &gpio1 24 0>, /* A2 */ <3 0 &gpio1 28 0>, /* A3 */ <4 0 &gpio1 15 0>, /* A4 (shared with D6) */ <5 0 &gpio1 16 0>, /* A5 (shared with D7) */ <6 0 &gpio1 9 0>, /* D0 */ <7 0 &gpio1 10 0>, /* D1 */ <8 0 &gpio1 19 0>, /* D2 (shared with D10) */ <9 0 &gpio1 20 0>, /* D3 (shared with D13) */ <10 0 &gpio1 8 0>, /* D4 (R800 populated) */ <11 0 &gpio1 1 0>, /* D5 (R793, shared with D14) */ <12 0 &gpio1 15 0>, /* D6 (shared with A4) */ <13 0 &gpio1 16 0>, /* D7 (shared with A5) */ <14 0 &gpio2 2 0>, /* D8 */ <15 0 &gpio1 3 0>, /* D9 (R795 populated) */ <16 0 &gpio1 19 0>, /* D10 (shared with D2) */ <17 0 &gpio1 18 0>, /* D11 */ <18 0 &gpio1 17 0>, /* D12 */ <19 0 &gpio1 20 0>, /* D13 (shared with D3) */ <20 0 &gpio1 1 0>, /* D14 (shared with D5)*/ <21 0 &gpio1 2 0>; /* D15 */ };
Note
On MIMXRT1010-EVK pin D4 (GPIO), D5 (GPIO/PWM), and D9 (GPIO/PWM) are disconnected in default and can be closed optionally. With this GPIO map overwrites the resistors R793, R795 and R800 must be fitted for proper use. But keep in mind that the signals are already connected to other on-board header for the NXP special motor driver add-on board.
change active polarity of the green user LED
LD1
from low to high:NXP MIMXRT1010-EVK
mimxrt1010_evk.overlay&green_led { gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; };
add a
zephyr,flash-disk
node linked to thepartition = <&storage_partition>;
with the hard defined mass storage disk namedisk-name = "NAND";
– also set the mass storage disk name hard on Kconfig level by a new board config file withCONFIG_MASS_STORAGE_DISK_NAME
:NXP MIMXRT1010-EVK
mimxrt1010_evk.overlay/ { msc_disk0 { compatible = "zephyr,flash-disk"; partition = <&storage_partition>; disk-name = "NAND"; // CONFIG_MASS_STORAGE_DISK_NAME cache-size = <4096>; }; };
Kconfig.defconfig# # WARNINGS and NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME): # # 1. In principle, the disk name can be freely selected. If this is changed # here in Kconfig, then the corresponding property "disk-name" in the # corresponding Devicetree node with the compatibility "zephyr,flash-disk" # must also be adapted. This should be improved in the future, as it # represents double data storage. # # 2. If the FAT file system is used, the disk name defined here will also # be used as the mountpoint. The currently used FATFS implementation # automatically enters the disk name as mountpoint, which means that # an application can only reach the correct disk via the exact same # mountpoint name. Unfortunately, the current example application under # "zephyr/samples/subsys/usb/mass" is hard-coded at this point and only # expects the (disk) mountpoint name "NAND" and nothing else. This must # be changed, as this implicitly represents a special configuration at # source code level. # config MASS_STORAGE_DISK_NAME default "NAND" if BOARD_MIMXRT1010_EVK depends on USB_DEVICE_STACK && USB_MASS_STORAGE