serial (PL011) config on RaspberryPi

From: <hohe72_at_posteo.de>
Date: Sun, 27 Oct 2024 19:21:47 UTC
Hi,
I have a problem setting the speed of the physical UART on a
Raspberry Pi 3B+.

I want to connect a HP48 pocket calculator an Raspi serially
via RS232.

Raspi's running FreeBSD 14.1-RELEASE.
Serial lines: RX,TX,Shield,GND  (no CTS nor RTS)

Finally I'll use Kermit but while here are issues, I first aim
for serial running.

That is: echo -n "S" > /dev/cuau0  # sending
and:     cat /dev/cuau0            # receiving
                                   ("S" = #53h = #01010011b)

Watching on oscilloscope:
Send signals can be observed from Raspi and Hp48.

Config:
edit: /etc/ttys
 Commented out all 'ttyuN' lines (0-3) cause that gave me
 access to 'cuau0' and disposed console butting in.


Well:

stty -a -f /dev/cuau0
 speed 115200 baud; 0 rows; 0 columns;
 <snip>
stty -f /dev/cuau0 speed 9600
 115200
stty -a -f /dev/cuau0
 speed 9600 baud; 0 rows; 0 columns;
 <snip>

seems to work, however:

echo -n "S" > /dev/cuau0    # sending from Raspi
 sends 8.62_µs a bit. That is 115200_baud.

 sending from HP48:
 sends 104.80_µs a bit. That's 9600_baud.
cat /dev/cuau0   # doesn't receive anything, ofcause


So:
How to set the serial line's speed. (manually, after boot)


Thanks in advance,
Holger