From 43856dadd62c9cf4fbf5f57e0dcd7ba3fa9ca462 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 16 Sep 2021 17:41:40 +0200 Subject: [PATCH] litedram_gen: Fix UART interrupt/polling. --- litedram/gen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litedram/gen.py b/litedram/gen.py index 1024c15..76109e1 100755 --- a/litedram/gen.py +++ b/litedram/gen.py @@ -514,7 +514,10 @@ class LiteDRAMCore(SoCCore): else: self.submodules.uart_phy = RS232PHY(platform.request("uart"), self.clk_freq, 115200) self.submodules.uart = UART(self.uart_phy) - self.add_interrupt("uart") + if self.irq.enabled: + self.irq.add("uart", use_loc_if_exists=True) + else: + self.add_constant("UART_POLLING") # CRG -------------------------------------------------------------------------------------- if isinstance(platform, SimPlatform):