Nordic Semiconductor PCA10040

The Nordic Semiconductor PCA10040 is a single-board development kit for wireless applications based on the Nordic Semiconductor nRF52832 SoC.

Interfaces

InterfaceHardware SupportedTinyGo Support
GPIOYESYES
UARTYESYES
SPIYESYES
I2CYESYES
ADCYESYES
PWMYESYES
USBDeviceNONO
BluetoothYESYES

Pins

PinHardware pinAlternative names
LED1P0_17LED
LED2P0_18
LED3P0_19
LED4P0_20
BUTTON1P0_13BUTTON
BUTTON2P0_14
BUTTON3P0_15
BUTTON4P0_16
UART_TX_PINP0_06
UART_RX_PINP0_08
ADC0P0_03
ADC1P0_04
ADC2P0_28
ADC3P0_29
ADC4P0_30
ADC5P0_31
SDA_PINP0_26
SCL_PINP0_27
SPI0_SCK_PINP0_25
SPI0_SDO_PINP0_23
SPI0_SDI_PINP0_24

Machine Package Docs

Documentation for the machine package for the PCA10040

Flashing

There are two options to flash the PCA10040 board.

You must install OpenOCD before you will be able to flash the PCA10040 board with your TinyGo code. You should check OpenOCD Documentation for installation and configuration instructions.

Once you have installed it correctly, you will be able to flash the PCA10040 board with your TinyGo code.

  • Plug your PCA10040 into your computer’s USB port.
  • Build and flash your TinyGo program using tinygo flash -target=pca10040

Programs can be loaded onto the PCA10040 board using the nrfjprog command line utility program.

First install the J-Link Software and Documentation Pack from Segger: https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack

Then install the nRF5x Command-Line Tools: https://docs.zephyrproject.org/latest/guides/tools/nordic_segger.html#nrf5x-command-line-tools-installation

Once you have installed both of these correctly, you will be able to flash the PCA10040 board with your TinyGo code.

  • Plug your PCA10040 into your computer’s USB port.
  • Build and flash your TinyGo program using tinygo flash -target=pca10040 -programmer command