ARM V2M MPS2¶
The mps2_an385 board configuration is used by Zephyr applications that run on the V2M MPS2 board. It provides support for the ARM Cortex-M3 (AN385) CPU and the following devices:
- Nested Vectored Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
- Cortex-M System Design Kit UART
More information about the board can be found at the V2M MPS2 Website.
The Application Note AN385 can be found at Application Note AN385.
ARM V2M MPS2 provides the following hardware components:
- ARM Cortex-M3 (AN385)
- ARM IoT Subsystem for Cortex-M
- Form factor: 140x120cm
- SRAM: 8MB single cycle SRAM, 16MB PSRAM
- Video: QSVGA touch screen panel, 4bit RGB VGA connector
- Audio: Audio Codec
- ARM JTAG20 connector
- ARM parallel trace connector (MICTOR38)
- 20 pin Cortex debug connector
- 10 pin Cortex debug connector
- ILA connector for FPGA debug
The mps2_an385 board configuration supports the following hardware features:
|NVIC||on-chip||nested vector interrupt controller|
|UART||on-chip||serial port-polling; serial port-interrupt|
Other hardware features are not currently supported by the port. See the V2M MPS2 Website for a complete list of V2M MPS2 board hardware features.
The default configuration can be found in the defconfig file:
MPS2 is a Cortex-M3 based SoC and has 15 fixed exceptions and 45 IRQs.
A Cortex-M3/4-based board uses vectored exceptions. This means each exception calls a handler directly from the vector table.
Handlers are provided for exceptions 1-6, 11-12, and 14-15. The table here identifies the handlers used for each exception.
|Exc#||Name||Remarks||Used by Zephyr Kernel|
|2||NMI||system fatal error|
|3||Hard fault||system fatal error|
|4||MemManage||MPU fault||system fatal error|
|5||Bus||system fatal error|
|6||Usage fault||undefined instruction, or switch attempt to ARM mode||system fatal error|
|11||SVC||context switch and software interrupts|
|12||Debug monitor||system fatal error|
The ARM V2M MPS2 Board has 4 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
All GPIO controller pins are exposed via the following sequence of pin numbers:
- Pins 0 - 15 are for GPIO 0
- Pins 16 - 31 are for GPIO 1
- Pins 32 - 47 are for GPIO 2
- Pins 48 - 51 are for GPIO 3
Mapping from the ARM MPS2 Board pins to GPIO controllers:
For mode details please refer to MPS2 Technical Reference Manual (TRM).
The V2M MPS2 main clock is 24 MHz.
The V2M MPS2 processor has five UARTs. Both the UARTs have only two wires for RX/TX and no flow control (CTS/RTS) or FIFO. The Zephyr console output, by default, is utilizing UART0.
Programming and Debugging¶
V2M MPS2 provides:
- A USB connection to the host computer, which exposes a Mass Storage and an USB Serial Port.
- A Serial Flash device, which implements the USB flash disk file storage.
- A physical UART connection which is relayed over interface USB Serial port.
Flashing an application to V2M MPS2¶
Here is an example for the Hello World application.
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world mkdir build & cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=mps2_an385 .. # Now run ninja on the generated build system: ninja
Connect the V2M MPS2 to your host computer using the USB port and you should see a USB connection which exposes a Mass Storage and a USB Serial Port. Copy the generated zephyr.bin in the exposed drive. Reset the board and you should be able to see on the corresponding Serial Port the following message:
Hello World! arm