Hi,
I am working on S32K144 LPUART. I want to test UART with 921600 baud rate. I am unable to find SBR and OSR values for 921600 baud rate. I checked S32K design studio drivers with these drivers also not coming.
I am communicating with Bluetooth with 921600 baud rate. While calculating, I got SBR = 1 & OSR = 9 for 921600 baud rate. When I tested with Serial monitor this baud rate is working fine, but When I tested with Bluetooth some characters are missing. The Bluetooth is in 921600 baud rate.
Any further changes I need to do. If possible, please tell me SBR and OSR values for 921600 baud rate.
Thanks & Regards,
Ravi Ranjan
Hi,
What is your LPUART peripheral frequency?
Regards,
Daniel
Hi Daniel,
Thanks for reply. I am using clock option 1 that is 8 MHz. With this frequency I am getting 1 Mbps baud rate, but I'm unable to get 921600 baud rate. I tried with clock option 6 also that is SPLLDIV2 clock, with this frequency also I am not getting.
Regards,
Ravi Ranjan
Hi Ravi,
Using 8MHz peripheral clock, you can get indeed only 1Mhz baud rate (OSR = 7 (+1), SBR = 1), error +8.51% which is too high.
I don’t know your SPLLDIV2 clock frequency, but in case it is 48MHz, you can set
OSR = 12(+1), SBR = 4
or OSR = 25(+1), SBR = 2
Baud rate 923077, error only +0.16%.
Also, in this case the OSR will be higher which is recommended.
Regards,
Daniel