KSDK board clock configuration

cancel
Showing results for 
Search instead for 
Did you mean: 

KSDK board clock configuration

Jump to solution
609 Views
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 ?

Labels (1)
0 Kudos
1 Solution
78 Views
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!

View solution in original post

0 Kudos
8 Replies
79 Views
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!

View solution in original post

0 Kudos
79 Views
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 Kudos
79 Views
NXP Employee
NXP Employee

Hi,

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

0 Kudos
79 Views
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 Kudos
79 Views
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 Kudos
79 Views
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 Kudos
79 Views
NXP Employee
NXP Employee

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

0 Kudos
79 Views
Senior Contributor IV

Carlos_Musich, could you help this issue?

Thanks,

Yixing

0 Kudos