Clock Configuration of MPC5744P using MBD

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

Clock Configuration of MPC5744P using MBD

1,940 Views
abhishek_kumar1
Contributor IV

Dear All

We are trying to use a different XTAL (20 MHz) for our design and we used MPC5744P (the excel sheet as attached). I found similar code in Excel and mpc_clock_man_panther.c file

pastedImage_2.pngpastedImage_3.png

My question

1. How do I implement exactly what config is in the attached Excel sheet with model based toolbox?

   Currently it is not possible in the MBD toolbox to change clock settings.

2. What are the files in toolbox which will be effected (what replaces SysClk_Init function, etc..)?

I tried to take reference from my previous question and compare the excel and C file.

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

Best Regards,

Abhishek 

mariuslucianandrei‌, ext-rafael.barbosa@chassisbrakes.com

4 Replies

1,670 Views
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

We provide, together with our toolbox in the following path NXP_MBDToolbox_MPC57xx\code\tools\ClockConfig\mbdt_default_clock_config_panther, an S32DSforPA project that describes the clock configuration used in the MBDT Toolbox. You can import that project in the S32DS and modify the project clock configuration in PEX according to your needs. 

Once you generate the code, in the clockMan1.c you will find a clock_manager_user_config_t structure. This one contains the clock configuration that must be replaced in our toolbox.

pastedImage_4.png

So you need to copy the generated clock configuration in the  clock_manager_user_config_t clockMan1_InitConfig0_panther structure in the NXP_MBDToolbox_MPC57xx\code\mbdtbx_mpc574x\src\c_library\mpc_clock_man_panther.c. Together with that, you will need to change, in the new configuration, the count and peripherals field, as in the following screenshoot:

pastedImage_10.png

I recommend you to backup the initial mpc_clock_man_panther.c.

Hope this helps,

Marius

1,670 Views
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

I updated the mpc_clock_man_panther.c file (attached).

Do we also need to change mask settings for Simulink blocks.

As it still shows the option only for 40Mhz.

Please help on this

pastedImage_1.png

Best Regards,

Abhishek

0 Kudos

1,669 Views
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

Could you please provide some input on the above question?

Thank you!

Best Regards

Abhishek

0 Kudos

1,669 Views
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

The external clock frequency is written directly in the mbd_mpc574x_ec_toolbox, and not populated dynamically from a script, so you can edit the mbd_mpc574x_ec_toolbox.mdl file and add the 20MHz option. 

Hope this helps,

Marius

0 Kudos