Skip to content

Commit f4cad9f

Browse files
committed
Fix: only one CAN bus connector is exposed on the H7.
Note: The exposed CAN bus is made available as a 'CAN' software object, following the notion that Arduino IO objects always start without a number. This can be slightly confusing as the exact same peripheral is labelled CAN1 in the schematics.
1 parent 317fcb4 commit f4cad9f

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

variants/PORTENTA_H7_M7/pins_arduino.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,9 @@ void _ontouch1200bps_();
164164

165165
#define USB_MAX_POWER (500)
166166

167-
#define CAN_HOWMANY 2
167+
#define CAN_HOWMANY 1
168168

169-
#define PIN_CAN0_TX (PB_13)
170-
#define PIN_CAN0_RX (PB_5)
171-
172-
#define PIN_CAN1_TX (PH_13)
173-
#define PIN_CAN1_RX (PB_8)
169+
#define PIN_CAN0_TX (PH_13) /* Labeled CAN1_TX on high-density connector. */
170+
#define PIN_CAN0_RX (PB_8) /* Labeled CAN1_RX on high-density connector. */
174171

175172
#endif //__PINS_ARDUINO__

variants/PORTENTA_H7_M7/variant.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ PinDescription g_APinDescription[] = {
7878
{ PB_5, NULL, NULL, NULL },
7979
{ PB_6, NULL, NULL, NULL },
8080
{ PB_7, NULL, NULL, NULL },
81-
{ PB_8, NULL, NULL, NULL }, // CAN1 RX
81+
{ PB_8, NULL, NULL, NULL }, // HD-connector: CAN1_RX -> software object: CAN
8282
{ PB_9, NULL, NULL, NULL },
8383
{ PB_10, NULL, NULL, NULL },
8484
{ PB_11, NULL, NULL, NULL },
@@ -179,7 +179,7 @@ PinDescription g_APinDescription[] = {
179179
{ PH_10, NULL, NULL, NULL },
180180
{ PH_11, NULL, NULL, NULL },
181181
{ PH_12, NULL, NULL, NULL },
182-
{ PH_13, NULL, NULL, NULL }, // CAN1 TX
182+
{ PH_13, NULL, NULL, NULL }, // HD-connector: CAN1_TX -> software object: CAN
183183
{ PH_14, NULL, NULL, NULL },
184184
{ PH_15, NULL, NULL, NULL },
185185
{ PI_0, NULL, NULL, NULL },

0 commit comments

Comments
 (0)