Skip to content

Commit 3adfa85

Browse files
committed
[STM32F09x] Fix Serial using USART[3-8]
__HAL_GET_PENDING_IT() read IT line status in SYSCFG register which required to be clocked. This set of registers is implemented only on STM32F09x to collect all pending interrupt sources associated with each interrupt line into a single register. This allows users to check by single read which peripheral requires service in case more than one source is associated to the interrupt line. Fix #260 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 1cbe636 commit 3adfa85

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cores/arduino/stm32/uart.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ void uart_init(serial_t *obj)
253253
}
254254
#endif
255255

256+
#if defined(STM32F091xC) || defined (STM32F098xx)
257+
/* Enable SYSCFG Clock */
258+
/* Required to get SYSCFG interrupt status register */
259+
__HAL_RCC_SYSCFG_CLK_ENABLE();
260+
#endif
261+
256262
/* Configure GPIOs */
257263
/* RX */
258264
port = set_GPIO_Port_Clock(STM_PORT(obj->pin_rx));

0 commit comments

Comments
 (0)