Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/stm32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ HAL_SRC_C += $(addprefix $(STM32LIB_HAL_BASE)/Src/stm32$(MCU_SERIES)xx_,\
)
endif

ifeq ($(MCU_SERIES),$(filter $(MCU_SERIES),h7))
ifeq ($(MCU_SERIES),$(filter $(MCU_SERIES),h7 n6))
HAL_SRC_C += $(addprefix $(STM32LIB_HAL_BASE)/Src/stm32$(MCU_SERIES)xx_,\
hal_uart_ex.c \
)
Expand Down
8 changes: 4 additions & 4 deletions ports/stm32/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ bool uart_init(machine_uart_obj_t *uart_obj,
huart.Init.HwFlowCtl = flow;
huart.Init.OverSampling = UART_OVERSAMPLING_16;

#if defined(STM32G4) || defined(STM32H7) // WB also has a fifo..
#if defined(STM32G4) || defined(STM32H7) || defined(STM32N6) // WB also has a fifo..
huart.FifoMode = UART_FIFOMODE_ENABLE;
#endif

Expand Down Expand Up @@ -717,7 +717,7 @@ bool uart_init(machine_uart_obj_t *uart_obj,
uart_obj->char_width = CHAR_WIDTH_8BIT;
}

#if defined(STM32H7)
#if defined(STM32H7) || defined(STM32N6)
HAL_UARTEx_SetTxFifoThreshold(&huart, UART_TXFIFO_THRESHOLD_1_8);
HAL_UARTEx_SetRxFifoThreshold(&huart, UART_RXFIFO_THRESHOLD_1_8);
HAL_UARTEx_EnableFifoMode(&huart);
Expand Down Expand Up @@ -1186,8 +1186,8 @@ size_t uart_tx_data(machine_uart_obj_t *self, const void *src_in, size_t num_cha
// timeout_char by FIFO size + 1.
// STM32G4 has 8 words FIFO.
timeout = (8 + 1) * self->timeout_char;
#elif defined(STM32H7)
// STM32H7 has 16 words FIFO.
#elif defined(STM32H7) || defined(STM32N6)
// STM32H7 and STM32N6 have 16 words FIFO.
timeout = (16 + 1) * self->timeout_char;
#else
// The timeout specified here is for waiting for the TX data register to
Expand Down
Loading