9 years, 3 months ago.

LPC1769 LPCxpresso with Serial

Hi,

im trying to use mbed on my LPC1769 LPCxpresso. I set the platform to "mbed LPC1768" and started with porting the blinky-example. This is working without any problem. Then i want to add a serial line (UART3) for debugging, but this isn't working. The code stopped in the line, where the Serial-Object will be constructed. Does anybody know, how to solve the problem?

My Code

#include "mbed.h"

DigitalOut myled(P0_22);


int main() {
    
    myled = 1;
    Serial pc(P0_9, P0_10);    
    pc.printf("Hello World\n");
    while(1) {
        myled = 0;
        wait(0.2);
        myled = 1;
        wait(0.2);
    }
}

Thanks in advance,

Marcel

1 Answer

9 years, 3 months ago.

According to the LPC17XX User Manual, P0_9 port doesn't have UART capability and P0_10 is TXD2 (not RX for the Serial constructor parameter #2).

Accepted Answer

Thx, i read the wrong row... I changed the command to Serial pc(P0_0, P0_1) and now it's working fine =)

posted by Marcel Behlau 05 Aug 2015