Skip to content

Commit c299386

Browse files
authored
Add nrf52840-mdk-usb-dongle target (#1654)
machine/nrf52840: add support for nrf52840-mdk-usb-dongle target
1 parent afcc9d6 commit c299386

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// +build nrf52840_mdk_usb_dongle
2+
3+
package machine
4+
5+
const HasLowFrequencyCrystal = true
6+
7+
// LEDs on the nrf52840-mdk-usb-dongle
8+
const (
9+
LED Pin = LED_GREEN
10+
LED_GREEN Pin = 22
11+
LED_RED Pin = 23
12+
LED_BLUE Pin = 24
13+
)
14+
15+
// RESET/USR button, depending on value of PSELRESET UICR register
16+
const (
17+
BUTTON Pin = 18
18+
)
19+
20+
// UART pins
21+
const (
22+
UART_TX_PIN Pin = NoPin
23+
UART_RX_PIN Pin = NoPin
24+
)
25+
26+
// UART0 is the USB device
27+
var (
28+
UART0 = USB
29+
)
30+
31+
// I2C pins (unused)
32+
const (
33+
SDA_PIN = NoPin
34+
SCL_PIN = NoPin
35+
)
36+
37+
// SPI pins (unused)
38+
const (
39+
SPI0_SCK_PIN = NoPin
40+
SPI0_SDO_PIN = NoPin
41+
SPI0_SDI_PIN = NoPin
42+
)
43+
44+
// USB CDC identifiers
45+
const (
46+
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK USB Dongle"
47+
usb_STRING_MANUFACTURER = "Makerdiary"
48+
)
49+
50+
var (
51+
usb_VID uint16 = 0x1915
52+
usb_PID uint16 = 0xCAFE
53+
)

src/machine/board_nrf52840-mdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838

3939
// USB CDC identifiers
4040
const (
41-
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK USB Dongle"
41+
usb_STRING_PRODUCT = "Makerdiary nRF52840 MDK"
4242
usb_STRING_MANUFACTURER = "Makerdiary"
4343
)
4444

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"inherits": ["nrf52840"],
3+
"build-tags": ["nrf52840_mdk_usb_dongle", "nrf52840_reset_uf2", "softdevice", "s140v6"],
4+
"flash-1200-bps-reset": "true",
5+
"flash-method": "msd",
6+
"msd-volume-name": "MDK-DONGLE",
7+
"msd-firmware-name": "firmware.uf2",
8+
"uf2-family-id": "0xADA52840",
9+
"linkerscript": "targets/circuitplay-bluefruit.ld"
10+
}

0 commit comments

Comments
 (0)