-
-
Notifications
You must be signed in to change notification settings - Fork 212
Pin definition error in PORTENTA_H7_M4/pins_arduino.h #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Variant NICLA_VISION has the the same issue. |
As @tjaekel pointed out...I assume the M4 cannot use some digital pins like the M7: |
It is the opposite way: file given with this #error was for H7 (M7). So, H4 (M7) can access but not H7 (M7). I can only imagine this #error means: Some analog pins are ADC analog inputs: you can "cross-connect" with the other digital pin, PC2 drives now also PC2_C. but PC2_C is not a digital pin (can never be configured as digital out, just via "internal wiring it gets value from PC2). |
I agree. |
Hi @tjaekel Could you share some information on how to use STM CubeIDE for Portenta H7? |
File ArduinoCore-mbed/variants/PORTENTA_H7_M4/pins_arduino.h
The digital pin definitions for the pins D16 through D21 appear to be incorrect, and result in an error when used in code. These pins correspond to the digital pin designations for the analog pins.
48 // Digital pins
49 // -----------
50 #define D0 (0u)
51 #define D1 (1u)
52 #define D2 (2u)
53 #define D3 (3u)
54 #define D4 (4u)
55 #define D5 (5u)
56 #define D6 (6u)
57 #define D7 (7u)
58 #define D8 (8u)
59 #define D9 (9u)
60 #define D10 (10u)
61 #define D11 (11u)
62 #define D12 (12u)
63 #define D13 (13u)
64 #define D14 (14u)
65 #define D15 (15u)
66 #define D16 (u16)
67 #define D17 (u17)
68 #define D18 (u18)
69 #define D19 (u19)
70 #define D20 (u20)
71 #define D21 (u21)
The corresponding analog pin definitions appear to be correct:
27 // Analog pins
28 // -----------
29 #define PIN_A0 (15u)
30 #define PIN_A1 (16u)
31 #define PIN_A2 (17u)
32 #define PIN_A3 (18u)
33 #define PIN_A4 (19u)
34 #define PIN_A5 (20u)
35 #define PIN_A6 (21u)
36 #define PIN_A7 (22u)
The text was updated successfully, but these errors were encountered: