USART almost working (but hangs on long messages)

This commit is contained in:
Edward Emelianov
2026-03-14 01:16:00 +03:00
parent 14f544374a
commit 65c9ae34bc
12 changed files with 162 additions and 96 deletions

View File

@@ -34,9 +34,9 @@ TRUE_INLINE void gpio_setup(){ // setup some common GPIO
void hardware_setup(){
// enable all active GPIO clocking
RCC->AHBENR |= RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN;
RCC->APB1ENR |= RCC_APB2ENR_USART1EN;
RCC->APB2ENR |= RCC_APB1ENR_USART2EN;
RCC->AHBENR |= RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN | RCC_AHBENR_DMA1EN;
RCC->APB2ENR |= RCC_APB2ENR_USART1EN | RCC_APB2ENR_SYSCFGEN;
RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
gpio_setup();
//gpio_reinit();
adc_setup();