Skip to content

Commit e2c7d87

Browse files
committed
UART CLK
1 parent 3cab21d commit e2c7d87

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

firmware/chipignite/polysat/include/uart.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
#include <stdint.h>
1111

12+
#define UART_BAUD_RATE 9600
13+
#define CRYSTAL_CLK 10000000
14+
#define UART_CLKDIV ((CRYSTAL_CLK / UART_BAUD_RATE))
15+
1216
/* Begin typedef declarations */
1317

1418
/* Begin function prototype declarations */

firmware/chipignite/polysat/src/uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
void uart_init(void) {
1616
// Configure the UART
17-
reg_uart_clkdiv = 10;
17+
reg_uart_clkdiv = UART_CLKDIV;
1818
reg_uart_enable = 1;
1919

2020
// Clear any pending interrupts

0 commit comments

Comments
 (0)