How can I configure the S32K146 to use the LPUART at 921600

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How can I configure the S32K146 to use the LPUART at 921600

1,364 次查看
raulcastanon
Contributor II

Hello,

 

I'm using a development board S32K146 and working with the LPUART, i did the configuration using the SDK 8.5.
The configuration is:

Baud rate: settled as 256000 (no option to set it as 921600)

Parity: no parity
Stop bits: 1

Data: 8 bits

8 bit data + 1 stop bits + start bit

I've change the pins to LPUART0
Tx -> PTB1 output

Rx -> PTB0 input

I configured the FIRCDIV2_CLK at 48MHz as input clk

 

 

Using the code example lpuart_echo_s32k146, to get the desired baud rate I write before the initialization of the instance:
lpuart0_InitConfig0.baudRate = 921600U;

 

Tx communication is successful, frames are written correctly, but when I send the "Hello Board \r\n" string, I don't have the response back.

 

If I just low the baud rate to the fastest in the SDK the code works as expected...

Any suggestions?

标签 (2)
0 项奖励
回复
2 回复数

1,050 次查看
wjandsq
Contributor IV

you can  use  the value "919540",   it  work is very well.

919540.bmp

0 项奖励
回复

1,050 次查看
wjandsq
Contributor IV

it support  460800bps,I do belive .  921600 bps不稳定。1000000 bps 似乎可以,忘记了。

0 项奖励
回复