KSDK board clock configuration

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

KSDK board clock configuration

跳至解决方案
3,670 次查看
haidong_zheng
NXP Employee
NXP Employee

in KSDK 1.1.0 board clock configuration is in platform/startup/chipname/system_chipname.h.

The clock configuration is board relative variable.

Support we have several boards which have the same MCU chip and have the different external clock, for the current KSDK, how to describe this scenario ?

标签 (1)
0 项奖励
回复
1 解答
3,139 次查看
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

在原帖中查看解决方案

0 项奖励
回复
8 回复数
3,140 次查看
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!
0 项奖励
回复
3,140 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi!

Certainly in system_mcu.h you set the external clock reference speed and you could change this parameter for each of your boards but this means you would need to recompile the library each time you switch board. Instead of this I recommend to add jumpers to your boards, then you will need to modify the system initialization to add use the correct macro that matches the jumper configuration. This would be the easiest way to handle multiple clock configurations without the need to rebuild KSDK library any time you use a different board.

Regards,

Carlos

0 项奖励
回复
3,140 次查看
haidong_zheng
NXP Employee
NXP Employee

Hi,

Do you mean add board macro to system_mcu.h ? While this head file is board independent.

0 项奖励
回复
3,140 次查看
Carlos_Musich
NXP Employee
NXP Employee

Yes, at the end of the day the macro that indicates the external clock reference is in that file, and any change about the xtal should be made in this file. Then, this file is board independent only if you use the same clock reference value.

Regards,

Carlos

0 项奖励
回复
3,140 次查看
haidong_zheng
NXP Employee
NXP Employee

in boards hardware_init.c we still see fixed int xtal value, that will be conflict with other place xtal value.

0 项奖励
回复
3,140 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Haidong,

Actually, all the changes in startup code are made in compilation time. The initialization code is in the KSDK library and the application will not see this code.

On the other hand hardware_init.c contains functions that are called in the application code and this way you can reconfigure the mcu after being initialized.

Regards,

Carlos

0 项奖励
回复
3,138 次查看
haidong_zheng
NXP Employee
NXP Employee

We need move the xtal configuration from this chip head file to board head file.

0 项奖励
回复
3,138 次查看
YixingKong
Senior Contributor IV

Carlos_Musich, could you help this issue?

Thanks,

Yixing

0 项奖励
回复