mirror of
				https://github.com/tillitis/tillitis-key1.git
				synced 2025-11-03 15:24:28 -05:00 
			
		
		
		
	Update bit divisor calc in verilator's uart to our current 18 MHz
This commit is contained in:
		
							parent
							
								
									6f31bbe37a
								
							
						
					
					
						commit
						2bb62af183
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -24,10 +24,9 @@
 | 
			
		|||
#include "Vapplication_fpga.h"
 | 
			
		||||
#include "verilated.h"
 | 
			
		||||
 | 
			
		||||
// Joachim says:
 | 
			
		||||
// Clock: 12 MHz, 38400 bps
 | 
			
		||||
// Divisor = 12*10E6 / 38400 = 312
 | 
			
		||||
#define BIT_DIV 312
 | 
			
		||||
// Clock: 18 MHz, 38400 bps
 | 
			
		||||
// Divisor = 18*10E6 / 38400 = 468.75 ~ 469
 | 
			
		||||
#define BIT_DIV 469
 | 
			
		||||
 | 
			
		||||
struct uart {
 | 
			
		||||
	int bit_div;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue