BrunoLevy / learn-fpga

Learning FPGA, yosys, nextpnr, and RISC-V
BSD 3-Clause "New" or "Revised" License
2.58k stars 246 forks source link

Errors in UART read #38

Closed BrunoLevy closed 3 years ago

BrunoLevy commented 3 years ago

Sometimes on the ULX3S I get random characters from the UART. To reproduce: start FIRMWARE/EXAMPLES/tty_OLED.c (or use the left arrow in the "commander" GUI to start the shell)

BrunoLevy commented 3 years ago

Fixed using BB/IFS1P3BX combo as follows: (but I'm not 100% sure of what I deed though...)

 wire RXD_btw;
 BB RXD_bb(
   .I(1'b0), 
   .O(RXD_btw), 
   .B(RXD), 
   .T(1'b1)
 );
 IFS1P3BX RXD_pin(
   .SCLK(clk),          
   .D(RXD_btw),
   .Q(RXD_internal),
   .PD(1'b0)            
 );
Mecrisp commented 3 years ago

https://github.com/jamesbowman/swapforth/issues/45 https://github.com/jamesbowman/swapforth/pull/49