UART1 Baud setting in PE running on KL25 Freedom board problem

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

UART1 Baud setting in PE running on KL25 Freedom board problem

4,040件の閲覧回数
StephenLau
Contributor I

Hi,

I have encountered a problem that when I use the UART1 on KL25 Freedom Board on Pin18, Pin20 of connector J2 for Tx,Rx of UART1, I found the output Baud Rate is half what I set in ProcessExpert Component. For example, if I need 115200, I need to set it to 230400 in the Serial_LDD.

The CPU clock setting and the Serial_LDD settings are attached here.

BaudProblem_ClkSetting.png

BaudProblem_UART1Setting.png

I have checked it with oscilloscope and proved it by PC terminal. I am using CodeWarrior for MCU version 10.3

I hope it's helpful to be fixed in the coming version of PE.

Best Regards'

Stephen Lau

ラベル(1)
0 件の賞賛
返信
7 返答(返信)

2,152件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Yes, I have found the same problem, and I have filed a ticket to get it fixed.

The issue is that Processor Expert thinks that the bus is being clocked at 48MHz. It is not taking into account that the bus clock divider on L series is dividing down the Core clock, NOT the MCGOUTCLK that would be used on Kinetis K series.

0 件の賞賛
返信

2,152件の閲覧回数
Embionics
Contributor III

Hello Erich,

I am facing the same problem.

I am using  code warrior 10.3 for KL25Z128 controller.

I developed an application using UART1 on PTC4 And PTC3 pins.The micro controller has a crystal 8MHz and the PLL as PEE ( with Processor Expert ) at 96MHz with CoreClock at 48MHz and BusClock at 24MHz.

When i set baud rate 9600 for UART1 I found the output Baud Rate is half (4800) what I set in ProcessExpert Component.

Here my core clock to bus clock ratio is 1/2 and because of that my baud rate i (9600*(1/2))=4800.

If my core clock and bus clock ratio get is same it is get sets at 9600.

But if my core clock and bus clock ratio is changed what exact equation need to be apply?

Reg,

Amreen

0 件の賞賛
返信

2,152件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Yes, this is a problem of MCU10.3 (see Be Aware of the Baud Problem | MCU on Eclipse). I recommend that you verify/change the prescaler settings as outlined in above post, or switch to a later version of CodeWarrior. MCU V10.6 just came out.

0 件の賞賛
返信

2,151件の閲覧回数
StephenLau
Contributor I

Thanks. :smileyhappy:

0 件の賞賛
返信

2,152件の閲覧回数
vfilip
NXP Employee
NXP Employee

Hello,

we are aware of this issue. It will be fixed in the upcoming update of CW V10.3. The problem is in our model, so the requested value is necessary multiply by two to get the correct output timing.

We are sorry for inconvenience.

best regards

Vojtech Filip

Processor Expert Support Team


0 件の賞賛
返信

2,152件の閲覧回数
chiasyan
Contributor II

Hi,

I am not sure if anybody has noticed. Just a tiny mistake in the documentation (user manual and pin usage & pinout chart)

The J2 20 should be PTE1 which is UART1_RX

and J2 18 should be PTE2 which is UART1_TX

The quick reference card attached and the silkscreen on the bottom of the board are illustrated correctly.

Thank you.

0 件の賞賛
返信

2,152件の閲覧回数
vfilip
NXP Employee
NXP Employee

Hello,

I was informed that this should be fixed in the next release of the documentation.

best regards

Vojtech Filip

Processor Expert Support Team


0 件の賞賛
返信