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

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

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

Jump to solution
1,599 Views
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 

Tags (1)
1 Solution
1,442 Views
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

View solution in original post

3 Replies
1,443 Views
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

1,442 Views
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 Kudos
Reply
1,442 Views
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