aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/native/platform.h
diff options
context:
space:
mode:
authorMarc Singer2013-09-06 21:19:37 -0700
committerGareth McMullin2013-10-05 13:14:03 +0800
commit40820a2354bd76b86e429dbd9f213375dfe05af4 (patch)
treeb7886abba110f198f4e7d3fb9797dd36f8713598 /src/platforms/native/platform.h
parente5d253bf812daf1cab020d1f5acceeb4e8e5ae13 (diff)
Added internal pull-up to PWR_BR.
o Prevent probe from inadvertently powering target. If PWR_BR is allowed to float, the gate on Q1 (blackmagic_mini) will tend to be close enough to zero to turn the transistor on. We activate the internal pull-up on this IO pin to force the transistor off.
Diffstat (limited to 'src/platforms/native/platform.h')
-rw-r--r--src/platforms/native/platform.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platforms/native/platform.h b/src/platforms/native/platform.h
index 77382dc..40dd620 100644
--- a/src/platforms/native/platform.h
+++ b/src/platforms/native/platform.h
@@ -51,7 +51,8 @@ extern usbd_device *usbdev;
* LED2 = PB11 (Red LED : Error)
*
* TPWR = RB0 (input) -- analogue on mini design ADC1, ch8
- * nTRST = PB1
+ * nTRST = PB1 [blackmagic]
+ * PWR_BR = PB1 [blackmagic_mini] -- supply power to the target, active low
* SRST_OUT = PA2
* TDI = PA3
* TMS = PA4 (input for SWDP)
@@ -83,6 +84,8 @@ extern usbd_device *usbdev;
#define TRST_PORT GPIOB
#define TRST_PIN GPIO1
+#define PWR_BR_PORT GPIOB
+#define PWR_BR_PIN GPIO1
#define SRST_PORT GPIOA
#define SRST_PIN GPIO2