11 years 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.

  1. 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:

Seeeduino Arch from Seeed Studio is an mbed enabled development board which combines some advantages of mbed and Arduino. Arch is based on NXP LPC11U24 with Arduino form factor and …

Zhi Li, Please include all your setup code so that some one can help you with your problem.

posted by David Fletcher 21 Nov 2013

Zhi 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

2 Answers

Zhi Li
poster
10 years, 12 months 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 David Fletcher 22 Nov 2013

Zhi 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 David Fletcher 23 Nov 2013

Seeeduino Arch uses LPC11U24 like mbed LPC11U24, has only one UART. You can choose different pins as UART's RX and TX. So It's impossible to have two hardware UART ports. You can use software UART!

Yihui

posted by Yihui Xiong 25 Nov 2013

Thanks. I tried to define two UARTs and I find out that they both send out the same data.Anyway, I will try the software uart I guess.

posted by Zhi Li 25 Nov 2013
10 years, 12 months ago.

Zhi Li, If you have further questions please start a new thread for each one, otherwise things will get confused, thanks.

Dave.

Thanks a lot Dave for your instruction. Zhi

posted by Zhi Li 23 Nov 2013