TRK-USB-MPC5643L VCP maximum bit rate?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

TRK-USB-MPC5643L VCP maximum bit rate?

ソリューションへジャンプ
1,882件の閲覧回数
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,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 件の賞賛
返信
2 返答(返信)
1,731件の閲覧回数
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,732件の閲覧回数
brucemckenney
Contributor III

750kbps works great.

Thanks. (I wouldn't have guessed.)

0 件の賞賛
返信