Skip to content

Commit 8f027d2

Browse files
Add workaround for PA9/PA10 pin remapping
This sets an explicit mode for PA11/PA12 (aux and RTS/DE) to disable the remapping again. See stm32duino/Arduino_Core_STM32#1180
1 parent 476af80 commit 8f027d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ void setup() {
3131
DebugSerial.begin(1000000);
3232
DebugSerial.println("Starting");
3333
#endif
34+
RS485.begin(115200);
35+
// Configure PA11/PA12 to disable remapping of PA9/PA10
36+
// https://github.com/stm32duino/Arduino_Core_STM32/issues/1180
37+
pinMode(PA11, INPUT);
38+
pinMode(PA12, INPUT);
3439

3540
pinMode(STATUS_PIN, OUTPUT);
3641
}

0 commit comments

Comments
 (0)