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
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.
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?
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.