MKE04Z8VTG4 internal clock issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKE04Z8VTG4 internal clock issue

982 Views
umsankarkalluru
Contributor III

Hi

I am facing internal clock issue in the park MKE04Z8VTG4 to get the UART communication work..

Issue:

PC tool is configured for 9600 baud rate and KE04 part is configured close to 8192 and communication works.

But if KE04 is configured close to 9600, say 9500 the communication doesn't work.

Expected:

0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18

Received:

0x42, 0x88, 0x45, 0x48, 0x41, 0x28, 0x40, 0x20, 0x4B, 0x69, 0x70, 0x4B, 0xFC

Let me know your comments.And also can you suggest what settings i need change to get the accurate clock for peripherals from internal clock.

Labels (1)
0 Kudos
4 Replies

626 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello umsankar kalluru:

Jennie is correct, most probably the cause is the internal clock trimming. By default the KE04 is factory trimmed to 37.5 kHz. I think you are using Processor Expert, so please consider these 2 scenarios:

Case 1)

If using the factory trimmed values, make sure Processor Expert uses the 37.5 kHz frequency, disable the "Initialize slow trim value" and disable the "Calculate Trim..." option from the debug configuration:

Case1.png

Case 2)

For a different internal frequency (e.g. 31.25 kHz), set the frequency to Processor Expert, enable the "Initialize slow trim value", enable the "Calculate Trim..." option and also the "Use custom trim..." option with the desired frequency in the debug configuration:

Case2.png

Regards!

Jorge Gonzalez

0 Kudos

626 Views
umsankarkalluru
Contributor III

Hi

I am not able to find the "Program Trim Register" window in debug configuration.

We are using KDS 2.00 and Segger J link for debugging,

0 Kudos

626 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

Segger J link does not have the option to trim the internal reference, only P&E connections. In your case go with case (1) mentioned in my reply above.

Regards!

Jorge Gonzalez

0 Kudos

626 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

I suggest you follow this article to trim the internal reference clock to 31.25k. then you can get a baud rate more close to 9600.

Yes, OSDA can trim the reference of internal clock source!

can this solution work for you?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos