Skip to content

Commit be1d296

Browse files
committed
stm32: serial use 115200 baud rate
115200 is a much more sane "default" than 38400. Instead of a mix of 38400 and 115200, just use 115200 in all places. There's no reason for modern 32bit cpus to be using such old slow baudrates. Tested on f1, f4, l1. Replaced some old f1 code that predated some library support code for this.
1 parent e0f377f commit be1d296

32 files changed

Lines changed: 37 additions & 45 deletions

File tree

examples/stm32/f0/stm32f0-discovery/adc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ ADC\_IN1 input, and prints it to the serial port.
88
| Port | Function | Description |
99
| ----- | ----------- | --------------------------------- |
1010
| `PA1` | `(ADC_IN1)` | Analog input |
11-
| `PA9` | `(USART1)` | TTL serial output `(38400,8,N,1)` |
11+
| `PA9` | `(USART1)` | TTL serial output `(115200,8,N,1)` |

examples/stm32/f0/stm32f0-discovery/adc/adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void usart_setup(void)
6868
gpio_set_af(GPIOA, GPIO_AF1, GPIO9);
6969

7070
/* Setup UART parameters. */
71-
usart_set_baudrate(USART1, 38400);
71+
usart_set_baudrate(USART1, 115200);
7272
usart_set_databits(USART1, 8);
7373
usart_set_stopbits(USART1, USART_CR2_STOPBITS_1);
7474
usart_set_mode(USART1, USART_MODE_TX);

examples/stm32/f0/stm32f0-discovery/usart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ The sending is done in a blocking way.
99

1010
| Port | Function | Description |
1111
| ----- | ------------- | --------------------------------- |
12-
| `PA9` | `(USART1_TX)` | TTL serial output `(38400,8,N,1)` |
12+
| `PA9` | `(USART1_TX)` | TTL serial output `(115200,8,N,1)` |

examples/stm32/f0/stm32f0-discovery/usart/usart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void clock_setup(void)
3535
static void usart_setup(void)
3636
{
3737
/* Setup USART2 parameters. */
38-
usart_set_baudrate(USART1, 38400);
38+
usart_set_baudrate(USART1, 115200);
3939
usart_set_databits(USART1, 8);
4040
usart_set_parity(USART1, USART_PARITY_NONE);
4141
usart_set_stopbits(USART1, USART_CR2_STOPBITS_1);

examples/stm32/f0/stm32f0-discovery/usart_stdio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ The sending is done using newlib library in a blocking way.
99

1010
| Port | Function | Description |
1111
| ----- | ------------- | --------------------------------- |
12-
| `PA9` | `(USART1_TX)` | TTL serial output `(38400,8,N,1)` |
12+
| `PA9` | `(USART1_TX)` | TTL serial output `(115200,8,N,1)` |

examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static ssize_t _iowr(void *_cookie, const char *_buf, size_t _n)
5555
static FILE *usart_setup(uint32_t dev)
5656
{
5757
/* Setup USART2 parameters. */
58-
usart_set_baudrate(dev, 38400);
58+
usart_set_baudrate(dev, 115200);
5959
usart_set_databits(dev, 8);
6060
usart_set_parity(dev, USART_PARITY_NONE);
6161
usart_set_stopbits(dev, USART_CR2_STOPBITS_1);

examples/stm32/f1/lisa-m-2/usart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This example program sends some characters on USART2 on
44
[Lisa/M 2.0 board](see http://paparazzi.enac.fr/wiki/LisaM for details).
55

6-
The terminal settings for the receiving device/PC are 38400 8n1.
6+
The terminal settings for the receiving device/PC are 115200 8n1.
77

88
The sending is done in a blocking way in the code, see the usart\_irq example
99
for a more elaborate USART example.

examples/stm32/f1/lisa-m-2/usart/usart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static void usart_setup(void)
4141
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);
4242

4343
/* Setup UART parameters. */
44-
usart_set_baudrate(USART2, 38400);
44+
usart_set_baudrate(USART2, 115200);
4545
usart_set_databits(USART2, 8);
4646
usart_set_stopbits(USART2, USART_STOPBITS_1);
4747
usart_set_mode(USART2, USART_MODE_TX);

examples/stm32/f1/lisa-m-2/usart_dma/usart_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void usart_setup(void)
4848
GPIO_CNF_INPUT_FLOAT, GPIO_USART2_RX);
4949

5050
/* Setup UART parameters. */
51-
usart_set_baudrate(USART2, 38400);
51+
usart_set_baudrate(USART2, 115200);
5252
usart_set_databits(USART2, 8);
5353
usart_set_stopbits(USART2, USART_STOPBITS_1);
5454
usart_set_mode(USART2, USART_MODE_TX_RX);

examples/stm32/f1/stm32-h103/rtc/rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void usart_setup(void)
4343
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX);
4444

4545
/* Setup UART parameters. */
46-
usart_set_baudrate(USART1, 38400);
46+
usart_set_baudrate(USART1, 115200);
4747
usart_set_databits(USART1, 8);
4848
usart_set_stopbits(USART1, USART_STOPBITS_1);
4949
usart_set_mode(USART1, USART_MODE_TX);

0 commit comments

Comments
 (0)