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.
11 years, 1 month ago.
Can not change Arch UART baudrate
Hello I am using the mbed compiler for Seeedarch, but when I use serial.baud(115200) to set the baud rate of the uart pin P1_13 and P1_14, it does not change its baud rate. Does anyone know what is the reason for that? Thanks.
Here is the code I use for testing. Nothing quite special.
- include "mbed.h"
Serial bbb(P1_13,P1_14); seeedarch pin for the UART communication tx, rx
int main(){ while(1) { bbb.baud(115200); bbb.putc(0x55); wait(1); } }
Question relating to:
2 Answers
11 years, 1 month ago.
I think the problem is solved, I wonder if I did not measure the right signal the other day. Today when I tested it again, the serial.baud(115200) definitely change the baud rate. My next question is if it is possible to have two UART ports in the SeeedArch? Thanks.
I don't understand this part "My next question is if it is possible to UART port in the SeeedArch?". Please explain in more detail. I will do my best to understand, so please ask again.
Dave.
posted by 22 Nov 2013Zhi Li, Take a close look here http://mbed.org/platforms/Seeeduino-Arch/ you will see that you have access to 3 uarts.
Dave.
posted by 23 Nov 2013
Zhi Li, Please include all your setup code so that some one can help you with your problem.
posted by David Fletcher 21 Nov 2013Zhi Li, This code would work better:
int main(){ bbb.baud(115200); while(1) { bbb.putc(0x55); wait(1); } }
posted by David Fletcher 22 Nov 2013