4 years, 1 month ago.

PB10 PB11 as serial,but pb11 cant recevied data


2 Answers

4 years, 1 month ago.

Two points to start with: 1) please post code as text using the <<code>> and <</code>> tags rather than as an image. It's hard to edit/copy and past an image. Fortunately not an issue with this particular question.

2) It helps if you say which board you are using.

The reason PB10/11 don't work correctly is because they are connected to UART3. UART 3 is also used for the ST-Link debugger and USB serial port. The same UART can output on multiple pins but can only listen to a single pin.

If you were to change the baud rate of the USB serial output you would also see the baud rate of the data on PB10 change.

Basically the documentation on the Nucleo 144 based boards is misleading, they shouldn't list UART 3 anywhere in the pinout information since it's not really available to use.