wip working usart and receive, but wrong baud rate. also 0kb flash reported; programmer broken?

This commit is contained in:
Alexander Heldt
2024-12-26 21:55:47 +01:00
parent 592717d900
commit 21df1010bf
7 changed files with 125 additions and 126 deletions

View File

@@ -2266,11 +2266,11 @@ void usart2_init(void) {
((struct usart *) (0x40004400U))->CR1 = 0;
((struct usart *) (0x40004400U))->CR2 = 0;
((struct usart *) (0x40004400U))->CR3 = 0;
# 50 "src/usart.c"
((struct usart *) (0x40004400U))->CR1 |= (1 << 15);
# 54 "src/usart.c"
((struct usart *) (0x40004400U))->BRR &= ~((0b111111111111) << 4);
((struct usart *) (0x40004400U))->BRR |= (0x34 << 4);
((struct usart *) (0x40004400U))->BRR &= ~((0b111) << 0);
((struct usart *) (0x40004400U))->BRR |= (0x0 << 0);