de0: fix UART RTS/CTS direction.
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 8 Jun 2020 21:21:33 +0000 (23:21 +0200)
committerwhitequark <whitequark@whitequark.org>
Thu, 11 Jun 2020 14:10:55 +0000 (14:10 +0000)
RTS and CTS match the schematic, but the direction is incorrect:
CTS is output, RTS is input. Fix by setting role=dce.

Ref. https://www.intel.com/content/dam/altera-www/global/en_US/portal/dsn/42/doc-us-dsnbk-42-5804152209-de0-user-manual.pdf

nmigen_boards/de0.py

index 8574230713e2fec1e1cfc55a2d8840002bdb703b..5ba3e9af1fec64682e3ecdd3a4431df6dbdd7efa 100644 (file)
@@ -44,7 +44,8 @@ class DE0Platform(IntelPlatform):
 
         UARTResource(0,
             rx="U22", tx="U21", rts="V22", cts="V21",
-            attrs=Attrs(io_standard="3.3-V LVTTL")),
+            attrs=Attrs(io_standard="3.3-V LVTTL"),
+            role="dce"),
 
         Resource("display_hd44780", 0,
             Subsignal("e", Pins("E21", dir="o")),