The Problem of Can Module in the NXP Model-Based Design Tools

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

The Problem of Can Module in the NXP Model-Based Design Tools

1,930 Views
lijiantaowy
Contributor III

           When I configure can in the NXP Model-Based Design Tools, I  download the model to the 5744P development board. If I don't connect the can device or start the can device at the beginning, then connect and open the can device after the MCU is running. I will not receive Can signal, but I can receive the can signal after resetting the development board. Is there any way to solve this problem?
         Thank you for your interest in my question!mariuslucianandrei

0 Kudos
7 Replies

1,602 Views
constantinrazva
NXP Employee
NXP Employee

Hello lijiantaowy@163.com‌,

Regarding your initial question about CAN - could you share the model you are using? I'd like to get a better look at your problem, as I'm not sure I fully understand it - let me know if I got it right: you download the application to the board and you see no CAN signals until you reset the board. After resetting the board, everything works as expected.

Awaiting for your model and reply.

Kind regards,

Razvan.

0 Kudos

1,602 Views
lijiantaowy
Contributor III

Today, there is a new problem. I added the can receiving module in my program. The program does not run normally after being burned into the  5741P. The data in freemaster is displayed as 0.

pastedImage_1.png

0 Kudos

1,602 Views
lijiantaowy
Contributor III

Hello@Razvan

There is still a new problem. I wrote three CAN messages in the model, but after a period of time, there will be a phenomenon of sending fewer CAN messages. Sometimes, all CAN messages are dropped.

Best regard

Jiantao Li

0 Kudos

1,602 Views
lijiantaowy
Contributor III

The model I configured is as follows. In addition , can you help me see if the control framework is reasonable, and now the motor is not working very well.

Best Regards,

Jiantao Li 

0 Kudos

1,602 Views
mariuslucianand
NXP Employee
NXP Employee

Hello lijiantaowy@163.com‌,

Which MPC5744P dev board are you using, is it RevE or the previous one?

Best Regards,

Marius

0 Kudos

1,598 Views
lijiantaowy
Contributor III

Hello mariuslucianandrei

The picture below is  the development board。pastedImage_1.png

 I have another problem here. I wrote a motor control program according to the official example. What is the difference between 1 and 2 in the selection card below? When I select 1, set the step size to 0.001 in the simulink configuration. When the priority is lower than the FIFO interrupt (the period of the FIFO interrupt is 100us), the freemaster can't communicate with the MCU. When the priority is greater than the priority of the FIFO interrupt, the freemaster can communicate with the MCU. When I select 2, the freemaster cannot communicate with the MCU. In addition, when I set the step size to 0.1 in the simulink configuration, the program control effect is very poor, the current loop control program is placed in the FIFO interrupt processing, what is the relationship between this PIT0 interrupt?

pastedImage_2.png

0 Kudos

1,598 Views
mariuslucianand
NXP Employee
NXP Employee

Hello lijiantaowy@163.com‌,

The Timer options selets the Step Tick peripheral. If you select the PIT Channel 0, the toolbox automatically configures the Pit peripheral to trigger an interrupt every step time set in the simulink configuration, in your case 0.001s. What you are facing with the FreeMaster interrupt is normal, those interrupt requests come at higher frequencies. As am example, you can compare timings from our Motor control examples in our toolbox. 

When select the Timer as Supressed, this means that the toolbox will not trigger automatically the step function, so you will need to add a timer interrupt, and inside it to put your model. Right now, when you select Supressed this means that probably your app is not even running right now.

Hope this helps,

Marius