Closed Minims closed 4 years ago
Although this works around an issue on those specific boards, changing the default pins associated with the UART3 peripheral changes the behaviour that may be assumed by other boards, to fix this properly a way to configure this will need to be added.
a way to configure this will need to be added.
Correct, the pins can have 4 functions, selected by Funcnum 0..3, but these functions cannot be selected from Marlin config files as far as I know:
I assume - from the MARLIN perspective: I2S is not relevant, and Timer2 channel 0/1 are obtained from another pin. Selecting as I/O pin could be relevant fro some 3D printer board implementations (as well as the Timer2 pins in more rare cases).
Basically, functions are multiplexed to many pins. In the case of UART3 Pin 7/6 under Funcnum 3
and also Pin 46/47, Funcnum 2:
finally Pin 82/85, under Funcnum 3:
The last one is used by Bigtreetech.
I added "configurable" selection of pins, also configured the other UARTs that have different pin out options. Because I only knew how to contribute through git by locally comitting / pushing to my mirror, I created a pull request #41 I tested it got BTT SKR 1.4 Turbo, and could use the Serial3 just by setting a corresponding symbol in Marlin.
The advantage is, while now we can get what is needed for the BTT board, it does not impact other boards: they simply should not set the #define.
Fix UART3 on SKR Board with lpc1768 and lpc1769 look @ https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/221