ARM V2M Beetle¶
The v2m_beetle board configuration is used by Zephyr applications that run on the V2M Beetle board. It provides support for the Beetle ARM Cortex-M3 CPU and the following devices:
- Nested Vectored Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
- Cortex-M System Design Kit GPIO
- Cortex-M System Design Kit UART
More information about the board can be found at the V2M Beetle Website.
ARM V2M BEETLE provides the following hardware components:
- ARM Cortex-M3
- ARM IoT Subsystem for Cortex-M
- CORDIO Bluetooth Smart radio
- 256KB of embedded flash
- 128KB SRAM
- 2MB of external QSPI flash.
- JTAG, SWD & 4 bit TRACE
- CMSIS-DAP with a virtual UART port
- Arduino interface
- GPIO, UART, SPI, I2C
- Analog signals
The v2m_beetle 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 Beetle Website for a complete list of V2M Beetle board hardware features.
The default configuration can be found in the defconfig file:
Beetle 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 Beetle 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
Mapping from the ARM V2M Beetle Board pins to GPIO controllers:
For mode details please refer to Beetle Technical Reference Manual (TRM).
V2M Beetle has one external and two on-chip oscillators. The slow clock is 32.768 kHz, and the main clock is 24 MHz. The processor can set up PLL to drive the master clock.
The ARM Beetle processor has two 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 UART1.
Programming and Debugging¶
V2M Beetle 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.
This interfaces are exposed via CMSIS DAP. For more details please refer to CMSIS-DAP Website.
Flashing an application to V2M Beetle¶
You can build applications in the usual way. Here is an example for the Hello World application.
# From the root of the zephyr repository west build -b v2m_beetle samples/hello_world
Using CMake and ninja:
# From the root of the zephyr repository # Use cmake to configure a Ninja-based buildsystem: cmake -B build -GNinja -DBOARD=v2m_beetle samples/hello_world # Now run ninja on the generated build system: ninja -C build
Connect the V2M Beetle to your host computer using the USB port and you should see a USB connection which exposes a Mass Storage (MBED) and a USB Serial Port. Copy the generated zephyr.bin in the MBED drive. Reset the board and you should be able to see on the corresponding Serial Port the following message:
Hello World! arm