BrunoLevy / learn-fpga

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

First character sent to the UART is smashed #30

Closed BrunoLevy closed 3 years ago

BrunoLevy commented 3 years ago

Found out: in uart verilog, send_pattern should be initialized to 1 so that first value of the stop bit is correct.

Mecrisp commented 3 years ago

I confirm that send_pattern = 1; solves the smashed character. However, the short Reset delay sometimes also produced wrong characters directly after boot, so I reverted to reg [7:0] reset_cnt = 0;