Hi,
I wanted to see how to configure the internal clock of the S9KEAZN64 to be 40MHz?Can you provide a reference code?
Solved! Go to Solution.
Hi,
The fastest internal clock is 39.0625,and this need make a trim via a project with PE tools.
The details see 【经验分享】使用CodeWarrior10.5软件的PE工具trim芯片内部慢速时钟 - Kinetis - 恩智浦技术社区 - 手机版 - Powered by Discuz!
You can use KDS or MCUXpresso to Trim this .
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------
Hi,
The fastest internal clock is 39.0625,and this need make a trim via a project with PE tools.
The details see 【经验分享】使用CodeWarrior10.5软件的PE工具trim芯片内部慢速时钟 - Kinetis - 恩智浦技术社区 - 手机版 - Powered by Discuz!
You can use KDS or MCUXpresso to Trim this .
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------
Hi,
I will reply you immediately .
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------
Hi,Jianyu
Thank you,Any progress so far?
Hi,
I do know that KEAZN64 has 1024 times the internal . And from the datasheet, it shows internal clock from 31.25k-39.0625k. The typical value is 31.25k. This value is calibrated by factory .So we need to wite a new trim to ICS-c3.So could you please write ICS_CS =0; Please have a try.
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
------------------------------------------------------------------------------
Hi,Jianyu
I'm so sorry,I tried write ICS_C3 =0,but it didn't work.
I would very much like you to help me write a code. The time is not urgent, you can write when you have time.
(KEAZN64,internal clock frequency 40KHz(bus clock 20MHz)+UART(Baudrate 115200))
Hi,
From the reference manual,KEA64 support S9KEAZN64.
And internal clocking sources is from 31.25-39.0625khz. Which clock do you need to be 40khz.
Refer this demo ,
change the internal clock to 31.25 by config ICS_C3,core clock is 40mhz, bus clock is20Mhz.
change uart2 to uart0. and change BDL to 11. The baud rate as shows in follow pic .
Please have a try.
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,Jianyu
I tried your suggestion,but it didn't work.
First, KEAZ64 and KEAZN64 are two manuals,and KEAZN64's clock is 1024*31.25, not 1280*31.25.
We configured the clock like this, as you suggested. But the test failed.
Hi,
You can refer uart (FEI bus 20M baud 115200)code in "SDK-DRIVER-FRDM-KEA-S32DS\KEAZ64 Driver testcode and Examples (for S32DS)\FRDM-KEAZ64_Driver Testcodethis code" ,you can get it from attach file.
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Sorry.
I opened the program,it's programmed with KEAZ64,but I used a KEAZN64.
It's programmed with a 48MHz frequency,KEAZ64 can be tuned to 48MHz at maximum frequency,but the KEAZN64 is only 40MHz.
Hi,
Code as follows,please have a try
void Clk_Init(void)
{
ICS_C1=0x4; /* Enable the internal reference clock*/
ICS_C3= 0x90; /* Reference clock frequency = 39.0625 KHz*/
while(!(ICS_S & ICS_S_LOCK_MASK)); /* Wait for FLL lock, now running at 40 MHz (1024 * 39.0625Khz) */
ICS_C2|=ICS_C2_BDIV(1) ; /*BDIV=2, Bus clock = 20 MHz*/
ICS_S |= ICS_S_LOCK_MASK ; /* Clear Loss of lock sticky bit */
}
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,Jianyu
Thank you for your help,But I found it incorrect when I tried.
Can you provide a program that does that?
KEAZN64,internal clock frequency 40KHz(bus clock 20MHz)+UART(Baudrate 115200).