Page 1 of 1

Kogna RS485 Baud Rate

Posted: Fri Apr 03, 2026 2:54 pm
by griffinboyle
Hello,

I am currently using a Kogna to communicate with a custom board I designed over RS485, however I am encountering what appears to be a slight baudrate mismatch. The echoed Tx bytes which appear in the Rx buffer appear to be correct, but the external devices see framing errors. I found that when I tried to set the baud rate to exactly 1.5MBaud, the RS485 output is corrupted, with weird edge behavior outside of the realm of transmission-line effects - however setting it to 1.408MBaud seems to fix this completely, strangely enough.

My question is this: what are the known good actual baud rates for the Kogna RS485 bus, so that I don't have to try to guess what baudrate I'm getting for the baud rate I've requested. Are there any tricks when working with the RS485 bus to ensure continuously robust behavior?

Thanks in advance,
Griffin Boyle

Re: Kogna RS485 Baud Rate

Posted: Fri Apr 03, 2026 9:11 pm
by TomKerekes
Hi Griffin,

Hmmm. The UART is driven by a 228MHz clock and needs a sample clock that is 16X the baud rate so currently this formula is used to determine a clock divisor:

divisor = uartClk/(baudrate * 16);

At high baud rates the resolution is not great. In the case of 1.5MBaud the divisor is:
228MHz / (1.5MHz * 16) = 9.5

But this gets truncated to 9 so the actual baud rate will be:
228MHz / (16 * 9) = 1.583 MBaud (5.5% error)

Maybe we should round, or round up?

Picking a baud rate close to this value (but slightly less) should give a more accurate result.

eg 1.58 MBaud will result in 1.583 MBaud. (0.1% error)

1.408 has a divisor of:
228MHz / (1.408 *16) = 10.12, so actually
228MHz / (10 * 16) = 1.425 MBaud (1.2% error)


Here are baud rates that result in very close actual rates:

Divisor KBaud
39 365
38 375
37 385
36 395
35 407
34 419
33 431
32 445
31 459
30 475
29 491
28 508
27 527
26 548
25 569
24 593
23 619
22 647
21 678
20 712
19 749
18 791
17 837
16 890
15 949
14 1017
13 1095
12 1186
11 1294
10 1424
9 1582
8 1779
7 2034
6 2373
5 2847
4 3559
3 4745
2 7118
1 14236

Note above 1.582KBaud data can't be sent/received continuously because Kogna only services the UART every 90us and the UART only has a 16 character FIFO.

HTH