So i am using STM32Fdisc board. I wanted to use UART1 on my board.
I run the test script for checking UART
And here is what i get:for bus in (-1, 0, 1, 2, 3, 4, 5, 6, 7, "XA", "XB", "YA", "YB", "Z"):
try:
UART(bus, 9600)
print("UART", bus)
except ValueError:
print("ValueError", bus)
It gives me Error for UART1 too, which i don't think should happen. USART1 Tx & Rx pins are on PB7 & PB8. And also the example given in the test file are using UART1.Error -1
Error 0
Error 1
UART(2, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=3, read_buf_len=64)
UART 2
UART(3, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=3, read_buf_len=64)
UART 3
Error 4
Error 5
UART(6, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=3, read_buf_len=64)
UART 6
Here is some of the method available in example file.
So if they are able to use UART1, why I am not able to use UART1 ? Or is their any other way to use UART1 ?uart = UART(1)
uart = UART(1, 9600)
uart = UART(1, 9600, bits=8, parity=None, stop=1)
print(uart)