Skip to content

Commit 697d4f3

Browse files
Ken Sarkieskarlp
authored andcommitted
STM32F1xx RTC example: Change usart_send to blocking form to allow time to send characters
Tested with ET-STAMP-STM32
1 parent b779843 commit 697d4f3

File tree

1 file changed

+4
-3
lines changed
  • examples/stm32/f1/other/rtc

1 file changed

+4
-3
lines changed

examples/stm32/f1/other/rtc/rtc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ void rtc_isr(void)
8383
/* Display the current counter value in binary via USART1. */
8484
for (j = 0; j < 32; j++) {
8585
if ((c & (0x80000000 >> j)) != 0) {
86-
usart_send(USART1, '1');
86+
usart_send_blocking(USART1, '1');
8787
} else {
88-
usart_send(USART1, '0');
88+
usart_send_blocking(USART1, '0');
8989
}
9090
}
91-
usart_send(USART1, '\n');
91+
usart_send_blocking(USART1, '\n');
92+
usart_send_blocking(USART1, '\r');
9293
}
9394

9495
int main(void)

0 commit comments

Comments
 (0)