|
| 1 | +.. _phyboard_electra_am64xx_m4: |
| 2 | + |
| 3 | +phyBOARD-Electra AM64x M4F Core |
| 4 | +############################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The AM64x phyBOARD-Electra board configuration is used by Zephyr applications |
| 10 | +that run on the TI AM64x platform. The board configuration provides support |
| 11 | +for the ARM Cortex-M4F MCU core and the following features: |
| 12 | + |
| 13 | +- Nested Vector Interrupt Controller (NVIC) |
| 14 | +- System Tick System Clock (SYSTICK) |
| 15 | + |
| 16 | +The board configuration also enables support for the semihosting debugging console. |
| 17 | + |
| 18 | +See the `PHYTEC AM64x Product Page`_ for details. |
| 19 | + |
| 20 | +.. figure:: img/phyCORE-AM64x_Electra_frontside.webp |
| 21 | + :align: center |
| 22 | + :alt: phyBOARD-Electra AM64x |
| 23 | + |
| 24 | + PHYTEC phyBOARD-Electra with the phyCORE-AM64x SoM |
| 25 | + |
| 26 | +Hardware |
| 27 | +******** |
| 28 | +The AM64x phyBOARD-Electra kit features the AM64x SoC, which is composed of a |
| 29 | +dual Cortex-A53 cluster and two dual Cortex-R5F cores in the MAIN domain as |
| 30 | +well as a single Cortex-M4 core in the MCU domain. Zephyr is ported to run on |
| 31 | +the M4F core and the following listed hardware specifications are used: |
| 32 | + |
| 33 | +- Low-power ARM Cortex-M4F |
| 34 | +- Memory |
| 35 | + |
| 36 | + - 256KB of SRAM |
| 37 | + - 2GB of DDR4 |
| 38 | + |
| 39 | +- Debug |
| 40 | + |
| 41 | + - XDS110 based JTAG |
| 42 | + |
| 43 | +Supported Features |
| 44 | +================== |
| 45 | + |
| 46 | +The phyboard_electra/am6442/m4 configuration supports the following hardware features: |
| 47 | + |
| 48 | ++-----------+------------+-------------------------------------+ |
| 49 | +| Interface | Controller | Driver/Component | |
| 50 | ++===========+============+=====================================+ |
| 51 | +| NVIC | on-chip | nested vector interrupt controller | |
| 52 | ++-----------+------------+-------------------------------------+ |
| 53 | +| SYSTICK | on-chip | systick | |
| 54 | ++-----------+------------+-------------------------------------+ |
| 55 | +| PINCTRL | on-chip | pinctrl | |
| 56 | ++-----------+------------+-------------------------------------+ |
| 57 | +| UART | on-chip | serial | |
| 58 | ++-----------+------------+-------------------------------------+ |
| 59 | +| GPIO | on-chip | gpio | |
| 60 | ++-----------+------------+-------------------------------------+ |
| 61 | + |
| 62 | +Other hardware features are not currently supported by the port. |
| 63 | + |
| 64 | +Devices |
| 65 | +======== |
| 66 | +System Clock |
| 67 | +------------ |
| 68 | + |
| 69 | +This board configuration uses a system clock frequency of 400 MHz. |
| 70 | + |
| 71 | +DDR RAM |
| 72 | +------- |
| 73 | + |
| 74 | +The board has 2GB of DDR RAM available. This board configuration |
| 75 | +allocates Zephyr 4kB of RAM (only for resource table: 0xa4100000 to 0xa4100400). |
| 76 | + |
| 77 | +Serial Port |
| 78 | +----------- |
| 79 | + |
| 80 | +This board configuration uses a single serial communication channel with the |
| 81 | +MCU domain UART (MCU_UART0). |
| 82 | + |
| 83 | +GPIO |
| 84 | +---- |
| 85 | + |
| 86 | +The phyCORE-AM64x has a heartbeat LED connected to gpio6. It's configured |
| 87 | +to build and run the `basic/blinky` sample. |
| 88 | + |
| 89 | +SD Card |
| 90 | +******* |
| 91 | + |
| 92 | +Download PHYTEC's official `WIC`_ as well as `BMAP`_ and flash the WIC file with |
| 93 | +an etching software onto an SD-card. This will boot Linux on the A53 application |
| 94 | +cores of the SoM. These cores will then load the zephyr binary on the M4 core |
| 95 | +using remoteproc. |
| 96 | + |
| 97 | +The default configuration can be found in |
| 98 | +:zephyr_file:`boards/phytec/phyboard_electra/phyboard_electra_am6442_m4_defconfig` |
| 99 | + |
| 100 | +Flashing |
| 101 | +******** |
| 102 | + |
| 103 | +The Linux running on the A53 uses the remoteproc framework to manage the M4F co-processor. |
| 104 | +Therefore, the testing requires the binary to be copied to the SD card to allow the A53 cores to |
| 105 | +load it while booting using remoteproc. |
| 106 | + |
| 107 | +To test the M4F core, we build the :ref:`hello_world` sample with the following command. |
| 108 | + |
| 109 | +.. zephyr-app-commands:: |
| 110 | + :board: phyboard_electra/am6442/m4 |
| 111 | + :zephyr-app: samples/hello_world |
| 112 | + :goals: build |
| 113 | + |
| 114 | +This builds the program and the binary is present in the `build/zephyr` directory as `zephyr.elf`. |
| 115 | + |
| 116 | +We now copy this binary onto the SD card in the `/lib/firmware` directory and name it as `am64-mcu-m4f0_0-fw`. |
| 117 | + |
| 118 | +.. code-block:: console |
| 119 | +
|
| 120 | + # Mount the SD card at sdcard for example |
| 121 | + sudo mount /dev/sdX sdcard |
| 122 | + # copy the elf to the /lib/firmware directory |
| 123 | + sudo cp --remove-destination zephyr.elf sdcard/lib/firmware/am64-mcu-m4f0_0-fw |
| 124 | +
|
| 125 | +The SD card can now be used for booting. The binary will now be loaded onto the M4F core on boot. |
| 126 | + |
| 127 | +To allow the board to boot using the SD card, set the boot pins to the SD Card boot mode. Refer to `phyBOARD SD Card Booting Essentials`_. |
| 128 | + |
| 129 | +The board should boot into Linux and the binary will run and print Hello world to the MCU_UART0 |
| 130 | +port. |
| 131 | + |
| 132 | + |
| 133 | +.. _PHYTEC AM64x Product Page: |
| 134 | + https://www.phytec.com/product/phycore-am64x/ |
| 135 | + |
| 136 | +.. _WIC: |
| 137 | + https://download.phytec.de/Software/Linux/BSP-Yocto-AM64x/BSP-Yocto-Ampliphy-AM64x-PD23.2.1/images/ampliphy/phyboard-electra-am64xx-2/phytec-headless-image-phyboard-electra-am64xx-2.wic.xz |
| 138 | + |
| 139 | +.. _BMAP: |
| 140 | + https://download.phytec.de/Software/Linux/BSP-Yocto-AM64x/BSP-Yocto-Ampliphy-AM64x-PD23.2.1/images/ampliphy/phyboard-electra-am64xx-2/phytec-headless-image-phyboard-electra-am64xx-2.wic.bmap |
| 141 | + |
| 142 | +.. _phyBOARD SD Card Booting Essentials: |
| 143 | + https://docs.phytec.com/projects/yocto-phycore-am64x/en/bsp-yocto-ampliphy-am64x-pd23.2.1/bootingessentials/sdcard.html |
0 commit comments