About the default setting of the simulink configuration parameters in MPC5643L

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

About the default setting of the simulink configuration parameters in MPC5643L

Jump to solution
1,293 Views
edenli
Contributor V

Hi Guys,

When use the NXP rappid564xL to bulid the model, i found some repetitive work about the parameters of simulink configuration,so i modified some content about the Fixed-step size (fundamental sample time) and  Generate model web view as below show:

182985_182985.pngpastedImage_1.png

182986_182986.pngpastedImage_2.png

I modefied the file rappid564xl.tlc :

add the rtwgensettings.SelectCallback = ['MPC5643L_callback_handler(hDlg, hSrc)'] in the file.

shown as below:

182987_182987.pngpastedImage_3.png

And adding the file of MPC5643L_callback_handler.m,shown as attachment.

But When i build a new projection ,the Fixed-step size (fundamental sample time) and  Generate model web view is not default setting .i don't know where is error.

Who can give me some advises?

Original Attachment has been moved to: rappid564xl.tlc.zip

1 Solution
1,022 Views
paulvlase
NXP Employee
NXP Employee

Hi edenli,

You need to add the following extra line to set the version in the rappid564xl.tlc file:

  rtwgensettings.Version = '1';
  rtwgensettings.SelectCallback = ['MPC5643L_callback_handler(hDlg, hSrc)'];

See the section about SelectCallback in Customize System Target Files .

The rtwgensettings.SelectCallback is triggered only when you change the system target file, from something different than rappid564xl.tlc, to rappid564xl.tlc target. You change it from the Configuration Parameters dialog, from Code Generation panel.

system_target_file_browser.jpg

See the attached rappid564xl.tlc file that worked for me.

It seems that using rtwgensettings.ActivateCallback instead of  rtwgensettings.SelectCallback does what you are expecting. It calls MPC5643L_callback_handler when you load the model and updates the parameters from Configuration Parameters dialog.

I hope this helps you.

Best regards,
Paul

View solution in original post

2 Replies
1,023 Views
paulvlase
NXP Employee
NXP Employee

Hi edenli,

You need to add the following extra line to set the version in the rappid564xl.tlc file:

  rtwgensettings.Version = '1';
  rtwgensettings.SelectCallback = ['MPC5643L_callback_handler(hDlg, hSrc)'];

See the section about SelectCallback in Customize System Target Files .

The rtwgensettings.SelectCallback is triggered only when you change the system target file, from something different than rappid564xl.tlc, to rappid564xl.tlc target. You change it from the Configuration Parameters dialog, from Code Generation panel.

system_target_file_browser.jpg

See the attached rappid564xl.tlc file that worked for me.

It seems that using rtwgensettings.ActivateCallback instead of  rtwgensettings.SelectCallback does what you are expecting. It calls MPC5643L_callback_handler when you load the model and updates the parameters from Configuration Parameters dialog.

I hope this helps you.

Best regards,
Paul

1,022 Views
edenli
Contributor V

Hi Paul,

Thank you for your reply! Now,i have alreadly solved.

Best Regurds,

Eden Li

0 Kudos