TX-RX connection LPC1768 reporting a buad rate of 0

I’m trying to send tx-rx signals through the SKR V1.3’s Aux-1 TX/RX pins to the pi4 but the pi 4’s tx-rx pins but it’s only detecting a buad rate of 0 on ttyAMA0. I’ve disabled bluetooth and serial on the Pi4’s pins so the tx-rx pins should recieve a connection, but they dont.

Code for LPC1768:

//TX-RX pins
Serial pc(P0_2, P0_3, 9600);

int main() {
   //for disabling attached steppe rmotor 
   xEN = 1;

int i = 0;
pc.printf("Hello World!\n");

while(1){
    wait(1);
    pc.printf("This program has been running %d seconds", i++);
}

}

Pi 4 dmesg | grep tty output

[1.154356] fe201000.serial: ttyAMA0 at MMI0 0xfe201000 (irq = 29, base_baud = 0) is a PL011 rev2

Could be wrong wiring. Is LPC1768’s Tx pin connected to pi’s Rx pin?

Double checked, TX is to RX, RX is to TX and GND is to GND. The pins are correctly connected

You doesn’t seem to use Mbed OS 6. As far as I remember there was some issue with the Serial class. Try to create the Serial object without setting the speed (the default is 9600). You can then set it in the main if needed.

Serial pc(P0_2, P0_3);

i’ve tested it with and without the baud rate set and the results are the same

The P0_2, P0_3 pins are connected to the onboard UART to USB converter. Try to use other pins (UART).

On the pi 4 or skr v1.3?

On the LPC1768.

Other pins of the LPC1768 chip besides P0_2 & P0_3 or other tx-rx connected pins besides AUX-1 like TFT P7?

Im looking at the chip and the P0_2 & P0_3 look like the LPC’s only txrx pins

I have just downloaded the skr v1.3 schematic. Sorry, I was wrong. There in no UART to USB converter on the skr v1.3 like on the mbed LPC1768. How do you debug programs on the skr v1.3?

How do I know the message is sent if its connected to its self but not the pi?

How do you debug programs on the skr v1.3?

well ive only recently have been trying to get it connected to wheels to make them spin so i’d look at the wheels to see if they spun.

For this, ive been looking at “dmesg | grep tty” to see if its been recieving the tx/rx connection or not

The Mbed code seems OK for me. So most likely there is some problem on the pi side. If you have a UART to USB converter than you can test both, the skr v1.3 and the pi separately one by one.

ok so it was a pi 4 side problem…
Aparently it was connected to ttyS0 instead of ttyAMA0 because when I tried to connect to ttyS0 it worked and displayed my code… The baudrate it lists in dmesg is wrong, but connecting to it with a baud of 9600 works.

All I needed to do was add
enable_uart=1

in /boot/config.txt

and I confirmed it worked with the command

picocom --baud 9600 /dev/ttyS0