Questions about using PIT in MBD

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

Questions about using PIT in MBD

1,887 Views
youngkugpark
Contributor III

Hello, Everyone


I have used the HCS12x series so far, and have recently purchased DEVKIT-MPC5744p and Rev.B boards from NXP.

As the working environment is a simulation link, MBD Toolbox 3.1 was installed, the use of A/D, GPIO, and Flex CAN blocks was confirmed through an example file provided by NXP, and although they spent a lot of time, they were able to check whether these blocks were used without much difficulty.

However, I would like to use MBD Toolbox's PIT block for this, as I want to write a program with a Task of 10ms, 20ms and 100ms in my Simulink model.

So I ask the following question.
1. Is it my purpose to use PIT blocks in MBD Toolbox?
Can you recommend another way if it doesn't fit my purpose?

2. Is the Simulink model for PIT blocks currently available on NXP working normally? 
For reference, I am currently using the Malab 2019b, and I have tried it several times, but I have confirmed that the model provided to PIT is not working properly.

If there is a problem with the example model provided, how should I correct it?
Thanks for your helps.
Peter
Labels (3)
Tags (2)
9 Replies

1,524 Views
sparkee
Contributor V

youngkugpark

Check out the post here: https://community.nxp.com/thread/488575  

Great write up on exactly what you want to do.  Should work the same on MPC57xx.

1,524 Views
constantinrazva
NXP Employee
NXP Employee

Hello youngkugpark ,

First of all please note that we have just released a newer version of the MPC57xx toolbox: Model-Based Design Toolbox for MPC57xx Automotive Microprocessors Version 3.2.0 

Now to answer your questions:

1) You can use the PIT blocks to manage your tasks by using hardware interrupts, or you can schedule them software-only, like gramirezv‌ shows in this article (How-to) Multitasking on S32K144 MBDT Simulink .

2) We are not aware of any issue with the PIT blocks - can you let us know what exactly is not working and how are you testing it? Maybe post your model here.

Kind regards,

Razvan.

1,524 Views
youngkugpark
Contributor III

Hello, 

Papago

As you recommended, I updated MBD Toolbox.
By the way, there is a big problem for me now.
Simulink models made with the previous 3.1 do not operate normally. Compiled but not functioning normally at DEVKIT.
Also, the example files provided by NXP do not function normally. Is it because I'm ignorant?
For example, "flexcan_slave_mpc574x.mdl" especially "adc_mpc574xP.mdl" files require the Target Memory Model to be SRAM for DEVKIT to work.

Why does this happen after MBD Toolbox update?

1. Matlab Path Verification Completed
2. Click "Profile Configuration" in MBDT_EC_MPC574X Library to complete

I would appreciate it if you let me know what else I need to check.
0 Kudos

1,524 Views
youngkugpark
Contributor III

Hello, Constantin Razvan Chivu

After toolbox updata, the reason why DEVKIT did not operate normally was because .rbf was not changed.
In other words, when using MBD Toolbox 3.1, I have used MPC5744P_devkit.rbf, but if I upload the toolbox to 3.2, I learned that I should change it to MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf.

Anyway, I'm sorry to ask such a stupid questions, and thank you in advance for your help.
0 Kudos

1,524 Views
mariuslucianand
NXP Employee
NXP Employee

Hello youngkugpark

My colleague constantinrazvan.chivu will handle the further PIT questions, for which this thread was opened. Since you have already opened a new thread https://community.nxp.com/thread/530255  regarding the rbf questions.

Marius

0 Kudos

1,524 Views
youngkugpark
Contributor III

Hello, Constantin Razvan Chivu

I have another question.


As you know, I have DEVKIT-MP5744P Rev.B.
1.Should I use MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf in the updated RBF_Files of MBD Toolbox 3.2?

I also have DEVKIT-MPC5748G Rev.D1 and would like to use OpenSDA.
2. Should I use MPC5748G_S32DS_UART2_CAN0.rbf in this case?
The reason for this question was to run "flexcan_mpc574xg.mdl" provided by NXP in DEVKIT-MP5748G Rev.D1, but the LEDs on the board do not work.

Thank you every time.
0 Kudos

1,524 Views
constantinrazva
NXP Employee
NXP Employee

Hello youngkugpark ,

Just to make sure - now everything works as expected on your end? Both PIT and CAN examples?

Kind regards,

Razvan.

0 Kudos

1,524 Views
youngkugpark
Contributor III

Hi, Constantin Razvan Chivu

Yes, I have now solved most of the basic functions.
I will now construct a software platform for electric vehicle control using MPC5744.
If you have any questions while I'm working on this, I'll ask for your help then.
Best Regards,
Peter

1,524 Views
constantinrazva
NXP Employee
NXP Employee

Hello youngkugpark,

Great to hear that!

Seems like you're working on an interesting project - it would be great if you could share some details (non-confidential information, of course) about what you are working on, using our toolbox - we always appreciate that!

Kind regards,

Razvan.

0 Kudos