Browse Source

projects/riscv_usb: Fix UART divisor off-by-one

CLKDIV is divider value minus 2

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 5 years ago
parent
commit
f6d2bbabfd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      projects/riscv_usb/fw/boot.S
  2. 1 1
      projects/riscv_usb/fw/start.S

+ 1 - 1
projects/riscv_usb/fw/boot.S

@@ -29,7 +29,7 @@ _start:
 #ifdef BOOT_DEBUG
 	// Set UART divisor
 	li	a0, 0x81000004
-	li	a1, 23
+	li	a1, 22
 	sw	a1, 0(a0)
 
 	// Output 'a'

+ 1 - 1
projects/riscv_usb/fw/start.S

@@ -59,7 +59,7 @@ _start:
 #ifdef BOOT_DEBUG
 	// Set UART divisor
 	li a0, 0x81000000
-	li a1, 23
+	li a1, 22
 	sw a1, 4(a0)
 
 	// Output '1'