Skip to content

Module support

Mira is supported to run on a set of modules. To simplify pin mappings, there are a set of header files containing CPU to module pin mappings.

Supported modules

The supported modules are:

Module CPU Header file Other
MLE-N2 nRF52840 mira_boards/mle_n2.h
MWA-N2 nRF52840 mira_boards/mwa_n2.h Has RF frontend
MWA-N2 nRF52840 mira_boards/mwa_n3.h Has RF frontend

Definitions

Each pin contains a set of defines, for example:

#define MWA_N2_GPIO_P30_PORT      0
#define MWA_N2_GPIO_P30_PIN       3
#define MWA_N2_GPIO_P30           MIRA_GPIO_PIN(0, 3)

Each define starts with the board name in uppercase, followed by GPIO and the pad name on the module, in this example P30

There may be extra definitions depending on CPU or extra functionality

nrf52

The nrf52 family and nrf5-sdk uses another pin number coding than Mira. To be able to use the definitions for either direct access to NRF registers or calls to nrf5-sdk functions, there is an extra definition for each pin on nrf52 cpus, suffixed with _NRF:

#define MWA_N2_GPIO_P30_NRF       NRF_GPIO_PIN_MAP(0, 3)

Note that nrf_gpio.h also needs to be included to use the _NRF define.

Also note that many GPIO pins on nrf52 chipsets doesn't support high frequency IO or high drive capabilities, due to interference with radio. Check the comments in the header files for more information about each pin.

Analog capable pins

For cpus using an extra numbering for analog pins, an extra definition

#define MWA_N2_GPIO_P30_ANALOG    AIN1
Back to top