Change of Crystal and Lock Frequency (Model Based Design Toolbox)

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

Change of Crystal and Lock Frequency (Model Based Design Toolbox)

跳至解决方案
2,192 次查看
abhishek_kumar1
Contributor IV

Hello All

MBD_MPC574x_Config_Information Block for MPC574x MDB Toolbox (using MPC5744P), it is not possible to change Crystal Frequency. It is fixed to 40Mhz (which is the frequency of the crustal in the Evaluation Board). How do we change it if we are using a 20Mhz Crystal. 

Also, we are not able to change Clock Frequency. 

Any hints regarding it. 

pastedImage_1.png

Best Regards

Abhishek 

标记 (1)
1 解答
2,035 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

All the clock settings for the MPC5744P are performed in the 

{Toolboxe install path}\NXP_MBDToolbox_MPC57xx\code\mbdtbx_mpc574x\src\c_library\mpc_clock_man_panther.c file. If you want to change any of the clock setting please update this file. It will be copied in the generated code. 

Most of that C structure is generated using the S32Design Studio for Power Architecture and uses the S32K SDK. You can import the project from here {Toolboxe install path}\NXP_MBDToolbox_MPC57xx\code\tools\ClockConfig\mbdt_default_clock_config_panther and change the clock settings, then generate the new structure and replace it in that c file. 

Hope this helps, 

Marius

在原帖中查看解决方案

3 回复数
2,036 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

All the clock settings for the MPC5744P are performed in the 

{Toolboxe install path}\NXP_MBDToolbox_MPC57xx\code\mbdtbx_mpc574x\src\c_library\mpc_clock_man_panther.c file. If you want to change any of the clock setting please update this file. It will be copied in the generated code. 

Most of that C structure is generated using the S32Design Studio for Power Architecture and uses the S32K SDK. You can import the project from here {Toolboxe install path}\NXP_MBDToolbox_MPC57xx\code\tools\ClockConfig\mbdt_default_clock_config_panther and change the clock settings, then generate the new structure and replace it in that c file. 

Hope this helps, 

Marius

2,035 次查看
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

Thank you for the answer.

Question

If we change it in the Toolbox folder, it will change for the all the projects (which ever are built after this change)

Do we have an option for changing it in a project?

Best Regards

Abhishek

0 项奖励
回复
2,035 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

Unfortunately, as far as I know there is no such option. 

However, having such need I would modify the existing c structure by using the #ifdef directive for the settings for 20MHz clock and on the #else I would use the existing lines of code. And in the project that requires the 20MHz crystal I would use the custom code to define that macro.

#ifdef CRYSTAL_20

//clock code for the new crystal settings 

#else

//already existing code

#endif

Inside the  MBDT project  inserted as custom code the following line:

#define CRYSTAL_20  1

For more about custom code you can have a look on this topic https://community.nxp.com/message/1032329

Hope this helps you!

Marius