TRK-USB-MPC5643L VCP maximum bit rate?

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

TRK-USB-MPC5643L VCP maximum bit rate?

跳至解决方案
1,881 次查看
brucemckenney
Contributor III

I am using the TRK-USB-MPC5643L UART (LINFlexD_0) via the USB virtual COM port.

 

It runs perfectly up to 500kbps[BRR=8]. However, when I speed it up past this (571429[BRR=7], 666667[BRR=6], or 800000[BRR=5]), I get garbage characters as though the bit rate is wrong.

 

This affects both Rx and Tx, and the bytes are wrong one-for-one and consistently (always the same wrong value), so it doesn't appear to be very far off.

 

I'm using putty at my host; over the years I've found putty quite reliable even when using unusual bit rates. I've certainly had no difficulties with bit rates up to 1Mbps.

 

Is it possible that I'm going too fast for the passthrough logic in the MC9S08? What is the maximum bit rate I can use in the VCP?

标签 (1)
0 项奖励
回复
1 解答
1,729 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Most probably the issue is that a baud rate is not set similarly on both the JM60 and MPC5643L.

On the JM60 the baud rate is set as  SCI baud rate = BUSCLK/(16xBR)

Where BR = 1 to 8191. Assuming the bus clock is 24Mhz, then you can calculate baud rates the JM60 can be set to:

BR=1 … baudrate = 1 500 000, bit period = 0.666 us

BR=2 … baudrate =    750 000, bit period = 1.333 us

BR=3 … baudrate =    500 000, bit period = 2 us

BR=4 … baudrate =    375 000, bit period = 2.666us

etc..

If you set the LINIBRR and LINFBRR registers of the MPC5643L's LINFlex module in the way you get a baud rate as close as possible to above values, then you should be able to communicate properly.

See chapter 30.12.3 Fractional baud rate generation of the MPC5643L RM to know how LINIBRR and LINFBRR values are calculated.

BR, Petr.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,730 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Most probably the issue is that a baud rate is not set similarly on both the JM60 and MPC5643L.

On the JM60 the baud rate is set as  SCI baud rate = BUSCLK/(16xBR)

Where BR = 1 to 8191. Assuming the bus clock is 24Mhz, then you can calculate baud rates the JM60 can be set to:

BR=1 … baudrate = 1 500 000, bit period = 0.666 us

BR=2 … baudrate =    750 000, bit period = 1.333 us

BR=3 … baudrate =    500 000, bit period = 2 us

BR=4 … baudrate =    375 000, bit period = 2.666us

etc..

If you set the LINIBRR and LINFBRR registers of the MPC5643L's LINFlex module in the way you get a baud rate as close as possible to above values, then you should be able to communicate properly.

See chapter 30.12.3 Fractional baud rate generation of the MPC5643L RM to know how LINIBRR and LINFBRR values are calculated.

BR, Petr.

0 项奖励
回复
1,731 次查看
brucemckenney
Contributor III

750kbps works great.

Thanks. (I wouldn't have guessed.)

0 项奖励
回复