Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 8 months ago.
UART function can not success
Hi All,
I can use serial API to set tx rx (PC_6, PC_7) by NUCLEO-F746ZG , and it is work. But when I change other pin(PB_10,PB_11), it is not work. Have anyone can teach me why?
UART test
#include "mbed.h" Serial pc(PB_10 , PB_11 ); // tx, rx int main() { pc.baud(115200); while(1) { pc.putc(pc.getc()); } }
stm32
posted by Terry Lung 12 Apr 2017UART
posted by Terry Lung 12 Apr 2017What is your problem? Error message? MCU hangs? Can not receive or can not transmit data?
posted by Mark Peter Vargha 14 Apr 2017I can not receive, but can send "Hello Word".
posted by Terry Lung 14 Apr 2017Please, be accurate. Send "Hello World" from Nucleo to computer. You receive the message in the terminal application on your computer. (Which terminal application?) You send the "Hello World" from terminal application, and? Nucleo hangs? Or? Which USB-TTL adapter do you use? Connections are OK? Have you make the loopback test?
posted by Mark Peter Vargha 14 Apr 2017Dear Mark,
This is my environment::
software: tera term, ST-LINK Utility, mbed(online compiler).
hardware: NUCLEO-F746ZG, ftdi232.
I am indeed get "Hello World" from NUCLEO and echo every word by using PC_6 and PC_7. But when I change to PB_10 PB_11, it just only have a "Hello World" form NUCLEO. I can not echo word anymore.
UART_test2