STM32L4R5ZI-NUCLEO144 and serial driver
Posted: Thu Aug 08, 2019 10:32 am
Hi,
I have a STM32L4R5ZI-NUCLEO144 board. Printed on the board I can see that next to some pins are printed TX and RX. Those pins are associated with USART 3. If I use those pins, I can read through a serial device. The problem is when I want to use USART 2 (for example). In this case, I can't read correctly from the device.
CODE - USART 3:
OUTPUT - USART 3:
OUTPUT - USART 2 (using the pins and ports associated with USART2):
To display the information use the LPSD1.
Why does this happen? Is it a limitation of the board?
Cheers.
I have a STM32L4R5ZI-NUCLEO144 board. Printed on the board I can see that next to some pins are printed TX and RX. Those pins are associated with USART 3. If I use those pins, I can read through a serial device. The problem is when I want to use USART 2 (for example). In this case, I can't read correctly from the device.
CODE - USART 3:
Code: Select all
static const SerialConfig c = {57600, 0, USART_CR2_STOP1_BITS, 0};
sdObjectInit(&SD3);
sdStart(&SD3, &c);
palSetPadMode(
GPIOD,
8U,
PAL_MODE_ALTERNATE(7) | PAL_STM32_OSPEED_HIGH | PAL_STM32_OTYPE_PUSHPULL);
palSetPadMode(
GPIOD,
9U,
PAL_MODE_ALTERNATE(7) | PAL_STM32_OSPEED_HIGH | PAL_STM32_OTYPE_PUSHPULL)
OUTPUT - USART 3:
Code: Select all
$C159.5P-0.1R-1.7T23.5Ax-0.002Ay-0.031Az1.042*3D
$C160.3P-0.1R-1.7T23.5Ax-0.002Ay-0.031Az1.043*30
$C159.2P-0.1R-1.7T23.5Ax-0.003Ay-0.031Az1.043*3A
$C160.5P-0.1R-1.7T23.5Ax-0.003Ay-0.031Az1.043*37
$C160.7P-0.1R-1.7T23.5Ax-0.003Ay-0.031Az1.043*35
$C158.9P-0.1R-1.7T23.4Ax-0.002Ay-0.031Az1.043*30
OUTPUT - USART 2 (using the pins and ports associated with USART2):
Code: Select all
..........y.............y............................y..y.y..........y..y.y....
.....................................y.......y.................y...............y To display the information use the LPSD1.
Why does this happen? Is it a limitation of the board?
Cheers.