Microcontroller with real firmwareBMD-340-A-Rbmd340
u-blox BMD-340 (nRF52840)
Bluetooth module, nRF52840 – runs real firmware (Zephyr ELF / Intel HEX) on the Cortex-M4 emulator. Pins = pad numbers.
Key data
- Category
- ICs
- Simulation model
- Microcontroller with real firmware
- Manufacturer part number
- BMD-340-A-R
- Reference prefix
- M
- Pins
- 68
- Land pattern
- BMD-340_UBLOX_LGA68
Notes
The firmware runs on an emulated CPU core, instruction by instruction. Peripherals that the model implements (GPIO, timers, UART, SPI, I²C, ADC and others, see the description) act on the pins of the circuit, so the analog parts around the chip see the same voltages and timing as on a real board.
- Right-click the part and choose "Open in code editor" to write and compile its code; "Serial monitor" shows its UART output.
- In the inspector you can load a demo firmware or your own ELF / Intel HEX / BIN file instead.
- GPIO pins are real circuit pins: an LED on an output needs a series resistor, an input needs a defined level (pull-up or pull-down).
- The debugger in the code view stops at breakpoints and shows registers, variables and the call stack.
Simulation model
An emulated CPU core runs the firmware binary instruction by instruction. The GPIO pins are pins of the analog circuit: outputs drive through a driver resistance, inputs read the voltage with thresholds.
- Device
- nrf52840
- CPU core
- ARM Cortex-M4F
- Emulator
- ARM Cortex-M emulator
- Firmware
- Bare-metal C (arm-none-eabi-gcc) or a Zephyr project in the code view, or your own ELF / Intel HEX / BIN file
- Flash / RAM for firmware
- 1 MB / 256 KB
- Supply pins
- 17 / 1
- Mapped GPIO pins
- 48
Pins 68
simulatedreal chip onlyPin functions from the emulator and the datasheet.
| Pin | Name | Functions | Use |
|---|---|---|---|
| 6 | P0.25I/O pin | Button 4 on the nRF52840 DK (to GND, pull-up) | |
| 7 | P0.26I/O pin | I²C SDA on the Arduino header of the nRF52840 DK | |
| 8 | P0.27I/O pin | I²C SCL on the Arduino header of the nRF52840 DK | |
| 9 | P0.28/AIN4 *I/O pin | AIN4 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 10 | P0.29/AIN5 *I/O pin | AIN5 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 11 | P0.30/AIN6 *I/O pin | AIN6 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 12 | P0.31/AIN7 *I/O pin | AIN7 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 13 | P0.00/XL1I/O pin | XL1 | 32.768 kHz crystal (XL1/XL2) for the low-power clock, or GPIO |
| 14 | P0.01/XL2I/O pin | XL2 | 32.768 kHz crystal (XL1/XL2) for the low-power clock, or GPIO |
| 15 | P0.02/AIN0 *I/O pin | AIN0 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 19 | P0.03/AIN1 *I/O pin | AIN1 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 20 | P0.04/AIN2I/O pin | AIN2 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 21 | P0.05/AIN3I/O pin | AIN3 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| 22 | P0.06I/O pin | UART0 TX on the nRF52840 DK (Zephyr console) | |
| 23 | P0.07/TRACECLKI/O pin | TRACECLK | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) |
| 24 | P0.08I/O pin | UART0 RX on the nRF52840 DK (Zephyr console) | |
| 25 | P0.09/NFC1 *I/O pin | NFC1 | NFC antenna (NFC1/NFC2); usable as GPIO after disabling NFC in UICR |
| 26 | P0.10/NFC2 *I/O pin | NFC2 | NFC antenna (NFC1/NFC2); usable as GPIO after disabling NFC in UICR |
| 27 | P0.11I/O pin | Button 1 on the nRF52840 DK (to GND, pull-up) | |
| 28 | P0.12I/O pin | Button 2 on the nRF52840 DK (to GND, pull-up) | |
| 31 | P0.13I/O pin | LED1 on the nRF52840 DK (active low) | |
| 32 | P0.14I/O pin | LED2 on the nRF52840 DK (active low) | |
| 33 | P0.15I/O pin | LED3 on the nRF52840 DK (active low) | |
| 34 | P0.16I/O pin | LED4 on the nRF52840 DK (active low) | |
| 35 | P0.17I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 36 | P0.21I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 37 | P0.19I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 38 | P0.20I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 39 | P0.18/RESETI/O pin | RESET | Pin reset when enabled in UICR (Zephyr default on the DK); otherwise GPIO |
| 40 | P0.22I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 41 | P0.23I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 42 | P0.24I/O pin | Button 3 on the nRF52840 DK (to GND, pull-up) | |
| 43 | SWCLKI/O pin | SWCLK | SWD debug: bring out to a header to flash the module |
| 44 | SWDIOI/O pin | SWDIO | SWD debug: bring out to a header to flash the module |
| 48 | P1.05 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 49 | P1.06 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 50 | P1.07 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 51 | P1.08I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 52 | P1.09I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 53 | P1.10 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 54 | P1.11 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 56 | P1.00/SWOI/O pin | SWO | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) |
| 57 | P1.01 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 58 | P1.02 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 59 | P1.03 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 60 | P1.04 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 61 | P1.12 *I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| 62 | P1.13 *I/O pin | SPI MOSI on the Arduino header of the nRF52840 DK | |
| 63 | P1.14 *I/O pin | SPI MISO on the Arduino header of the nRF52840 DK | |
| 64 | P1.15 *I/O pin | SPI SCK on the Arduino header of the nRF52840 DK | |
| 65 | VCCHSupply pin | High-voltage supply input: tie to VCC for normal-voltage mode | |
| 66 | VBUSSupply pin | VBUS | USB 5 V sense input (USB is not simulated) |
| 67 | USB_D-I/O pin | USB_D- | USB full-speed data (real chip only, not simulated) |
| 68 | USB_D+I/O pin | USB_D+ | USB full-speed data (real chip only, not simulated) |
| 17 | VCCSupply pin | Supply 1.7–3.6 V (normal-voltage mode) | |
| 1 | GNDGround pin | Ground | |
| 2 | GNDGround pin | Ground | |
| 3 | GNDGround pin | Ground | |
| 4 | GNDGround pin | Ground | |
| 5 | GNDGround pin | Ground | |
| 16 | GNDGround pin | Ground | |
| 18 | GNDGround pin | Ground | |
| 29 | GNDGround pin | Ground | |
| 30 | GNDGround pin | Ground | |
| 45 | GNDGround pin | Ground | |
| 46 | GNDGround pin | Ground | |
| 47 | GNDGround pin | Ground | |
| 55 | GNDGround pin | Ground |
PCB
Verified land pattern
BMD-340_UBLOX_LGA68