Back to Zephyr

Overview

boards/nxp/frdm_imx93/doc/index.rst

4.4.010.1 KB
Original Source

.. zephyr:board:: frdm_imx93

Overview


The FRDM-IMX93 board is a low-cost and compact platform designed to show the most commonly used features of the i.MX 93 Applications Processor in a small and low cost package. The FRDM-IMX93 board is an entry-level development board, which helps developers to get familiar with the processor before investing a large amount of resources in more specific designs.

i.MX93 MPU is composed of one cluster of 2x Cortex®-A55 cores and a single Cortex®-M33 core. Zephyr RTOS is ported on Cortex®-A55 core.

Hardware


  • i.MX 93 applications processor

    • The processor integrates up to two Arm Cortex-A55 cores, and supports built-in Arm Cortex-M33 core.
  • RAM: 2GB LPDDR4

  • Storage:

    • SanDisk 16GB eMMC5.1
    • microSD Socket
  • Wireless:

    • Murata Type-2EL (SDIO+UART+SPI) module. It is based on NXP IW612 SoC, which supports dual-band (2.4 GHz /5 GHz) 1x1 Wi-Fi 6, Bluetooth 5.2, and 802.15.4
  • USB:

    • One USB 2.0 Type C connector
    • One USB 2.0 Type A connector
  • Ethernet

  • PCI-E M.2

  • Connectors:

    • 40-Pin Dual Row Header
  • LEDs:

    • 1x Power status LED
    • 1x RGB LED
  • Debug

    • JTAG 3-pin connector
    • USB-C port for UART debug, two COM ports for A55 and M33

Supported Features

.. zephyr:board-supported-hw::

Devices

System Clock

This board configuration uses a system clock frequency of 24 MHz. Cortex-A55 Core runs up to 1.7 GHz. Cortex-M33 Core runs up to 200MHz in which SYSTICK runs on same frequency.

Serial Port

This board configuration uses a single serial communication channel with the CPU's UART2 for A55 core and M33 core.

uSDHC (SD or eMMC Interface on A55)

i.MX 93 processor has three Ultra Secure Digital Host Controller (uSDHC) modules for SD/eMMC interface support. On the FRDM-IMX93 board, the uSDHC2 interface of the processor connects to the MicroSD card slot (P13), and uSDHC1 interface connects to the eMMC memory (located at the SOM board). DTS overlay file "usdhc1.overlay" and "usdhc2.overlay" are provided to enable specified the uSDHC controller.

Currently it relies on U-boot or Linux to boot Zephyr on Cortex-A Core, so Zephyr needs to use a different uSDHC controller from U-boot or Linux to avoid resource conflict. For example, if FRDM-IMX93 board boots from SD Card which uses uSDHC2, Zephyr can use MMC which uses uSDHC1 for testing:

.. zephyr-app-commands:: :zephyr-app: tests/subsys/sd/mmc :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build :gen-args: -DEXTRA_DTC_OVERLAY_FILE=usdhc1.overlay

And if FRDM-IMX93 board boots from MMC which uses uSDHC1, Zephyr can use SD Card which uses uSDHC2 for testing:

.. zephyr-app-commands:: :zephyr-app: tests/subsys/sd/sdmmc :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build :gen-args: -DEXTRA_DTC_OVERLAY_FILE=usdhc2.overlay

User Button GPIO Option

The user buttons USER_BTN1 and USER_BTN2 are connected to onboard GPIO expander PCAL6524 by default, but can be changed to connect to FRDM-IMX93 GPIO. A devicetree overlay is included to support this.

Run following command to test user buttons connected to FRDM-IMX93 GPIO:

.. zephyr-app-commands:: :zephyr-app: samples/basic/button :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build :gen-args: -DEXTRA_DTC_OVERLAY_FILE=frdm_imx93_mimx9352_native_btn.overlay

Note: The overlay only supports mimx9352/a55, but can be extended to support mimx9352/m33 if I2C and PCAL6524 is enabled.

PWM(TPM)

For A55 Core, TPM3 is enabled for :zephyr:code-sample:pwm-blinky application, the GREEN Colored LED in RGB LED LED1 on the board will blink with different frequency.

.. zephyr-app-commands:: :zephyr-app: samples/basic/blinky_pwm :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build

Programming and Debugging (A55)


.. zephyr:board-supported-runners::

There are multiple method to program and debug Zephyr on the A55 core:

Option 1. Boot Zephyr by Using U-Boot Command

U-Boot "cpu" command is used to load and kick Zephyr to Cortex-A secondary Core, Currently it is supported in : Real-Time Edge U-Boot_ (use the branch "uboot_vxxxx.xx-y.y.y, xxxx.xx is uboot version and y.y.y is Real-Time Edge Software version, for example "uboot_v2023.04-2.9.0" branch is U-Boot v2023.04 used in Real-Time Edge Software release v2.9.0), and pre-build images and user guide can be found at Real-Time Edge Software_.

.. _Real-Time Edge U-Boot: https://github.com/nxp-real-time-edge-sw/real-time-edge-uboot .. _Real-Time Edge Software: https://www.nxp.com/rtedge

Copy the compiled zephyr.bin to the first FAT partition of the SD card and plug the SD card into the board. Power it up and stop the u-boot execution at prompt.

Use U-Boot to load and kick zephyr.bin to Cortex-A55 Core1:

.. code-block:: console

fatload mmc 1:1 0xd0000000 zephyr.bin; dcache flush; icache flush; cpu 1 release 0xd0000000

Or use the following command to kick zephyr.bin to Cortex-A55 Core0:

.. code-block:: console

fatload mmc 1:1 0xd0000000 zephyr.bin; dcache off; icache flush; go 0xd0000000

Use this configuration to run basic Zephyr applications and kernel tests, for example, with the :zephyr:code-sample:synchronization sample:

.. zephyr-app-commands:: :zephyr-app: samples/synchronization :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build

This will build an image with the synchronization sample app, boot it and display the following console output:

.. code-block:: console

*** Booting Zephyr OS build v4.1.0-41-g6395333e3d18 ***
thread_a: Hello World from cpu 0 on frdm_imx93!
thread_b: Hello World from cpu 0 on frdm_imx93!
thread_a: Hello World from cpu 0 on frdm_imx93!
thread_b: Hello World from cpu 0 on frdm_imx93!

Option 2. Boot Zephyr by Using JLink Runner

Hardware Setup

The default runner for the board is JLink runner, there is one SWD connector P14 on the FRDM-IMX93 board.

Refer to NXP online document_ to rework FRDM-IMX93 board and connect SWD connector P14 to J-Link debugger.

.. _NXP online document: https://community.nxp.com/t5/FRDM-Training-Hub/How-to-use-J-link-on-FRDM-IMX93/ta-p/2122902

Flash and Run

Power up the board and stop the board at U-Boot command line.

Then use "west flash" command to load the zephyr.bin image from the host computer and start the Zephyr application on A55 core.

Here is an example for the :zephyr:code-sample:hello_world application.

.. zephyr-app-commands:: :zephyr-app: samples/hello_world :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: flash

Then the following log could be found on UART1 console:

.. code-block:: console

*** Booting Zephyr OS build v4.3.0-1976-g8f0df404c2ee ***
Hello World! frdm_imx93/mimx9352

Debug

Power up the board and stop the board at U-Boot command line.

Then use "west debug" command to load the zephyr.bin image from the host computer and debug the Zephyr application on A55 core.

Here is an example for the :zephyr:code-sample:hello_world application.

.. zephyr-app-commands:: :zephyr-app: samples/hello_world :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: debug

Option 3. Boot Zephyr by Using SPSDK Runner

SPSDK runner leverages SPSDK tools (https://spsdk.readthedocs.io), it builds an bootable flash image flash.bin which includes all necessary firmware components. Using west flash command will download the boot image flash.bin to DDR memory, SD card or eMMC flash. By using flash.bin, as no U-Boot image is available, so TF-A will boot up Zephyr on the first Cortex-A55 Core directly.

In order to use SPSDK runner, it requires fetching binary blobs, which can be achieved by running the following command:

.. code-block:: console

west blobs fetch hal_nxp

.. note::

It is recommended running the command above after :file:west update.

SPSDK runner is enabled by configure item :kconfig:option:CONFIG_BOARD_NXP_SPSDK_IMAGE, currently it is not enabled by default for FRDM-IMX93 board, so use this configuration to enable it, for example, with the :zephyr:code-sample:synchronization sample:

.. zephyr-app-commands:: :zephyr-app: samples/synchronization :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build :gen-args: -DCONFIG_BOARD_NXP_SPSDK_IMAGE=y

If :kconfig:option:CONFIG_BOARD_NXP_SPSDK_IMAGE is available and enabled for the board variant, flash.bin will be built automatically. The programming could be through below commands. Before that, onboard switch SW1[3:0] should be configured to 0b0001 for USB download mode to boot, and USB1 and DBG ports should be connected to Linux host PC. There are 2 serial ports enumerated (115200 8n1), the second port will be used for Cortex-A55 Zephyr's Console. (The flasher is spsdk which already installed via scripts/requirements.txt. On Linux host, USB device permission should be configured per Installation Guide of https://spsdk.readthedocs.io)

.. code-block:: none

load and run without programming. for next flashing, need to reset the board firstly

$ west flash -r spsdk

program to SD card, then set SW1[3:0]=0b0011 to reboot from SD

$ west flash -r spsdk --bootdevice sd

program to emmc card, then set SW1[3:0]=0b0010 to reboot from EMMC

$ west flash -r spsdk --bootdevice=emmc

Then the Zephyr log will be displayed in the second serial port's Console.

System Reboot (A55)

Currently i.MX93 only support cold reboot and doesn't support warm reboot. Use this configuratiuon to verify cold reboot with :zephyr:code-sample:shell-module sample:

.. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/shell_module :host-os: unix :board: frdm_imx93/mimx9352/a55 :goals: build

This will build an image with the shell sample app, boot it and execute kernel reboot command in shell command line:

.. code-block:: console

uart:~$ kernel reboot cold

.. include:: ../../common/board-footer.rst.inc