FPGA: Increase UART baud rate to 500k

This commit is contained in:
Mikael Ågren 2024-10-09 09:45:29 +02:00
parent d2a9100412
commit 5d138ef45b
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46

View File

@ -79,10 +79,10 @@ module uart (
// The default bit rate is based on target clock frequency
// divided by the bit rate times in order to hit the
// center of the bits. I.e.
// Clock: 21 MHz, 62500 bps
// Divisor = 21E6 / 62500 = 336
// Clock: 21 MHz, 500 kbps
// Divisor = 21E6 / 500E3 = 42
// This also satisfies 1E6 % bps == 0 for the CH552 MCU used for USB-serial
localparam DEFAULT_BIT_RATE = 16'd336;
localparam DEFAULT_BIT_RATE = 16'd42;
localparam DEFAULT_DATA_BITS = 4'h8;
localparam DEFAULT_STOP_BITS = 2'h1;