After MBD Toolbox Update

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

After MBD Toolbox Update

Jump to solution
1,224 Views
youngkugpark
Contributor III

Hello, Constantin Razvan Chivu 


After I updated to MBD Toolbox ver3.2, DEVKIT-MP5744P Rev.B and DEVKIT-MP5748G Rev.D1 did not work properly.
So I changed the rbf on each board and installed it.
1. DEVKIT-MPC5744P --> MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf
2. DEVKIT-MPC5748G --> MPC5748G_S32DS_UART2_CAN0.rbf
This installation seemed to work normally, but problems reoccurred in FlexCAN communication. 
Q1. Is each RBF file correct?

The attached file is modified to suit my purpose by using the example program provided by NXP, although it is a compilation but does not work normally.
The LED on the board does not work, and I have confirmed that the CAN transmission does not work using the oscilloscope.
If sent from DEVKIT-MPC5748G to CAN0 at 0x100, it is received at DEVKIT-MPC5744P. Of course, the CAN resistance was confirmed, and both boards used external power.

I'm sorry, but I'd appreciate it if you could review the attached file.
As you already know, I'm using Matlab2019b.)
I spent last weekend in the lab because of my ignorance.
Best Regards,
Peter
Tags (3)
1 Solution
1,095 Views
paulvlase
NXP Employee
NXP Employee

Hi youngkugpark‌,

I tried to run your models and indeed the PTA10 LED on the MPC5748G board is not blinking and the CAN communication is not working. The problem is that the FlexCAN ISR is initialized before FlexCAN module. The fix is to set the priority of the FCAN_Config block to 1. This way the code is generated for FCAN_Config block before the FCAN_ISR.

Right click on the FCAN_Config block, select Properties, and set the Priority field to 1.

Regards,

Paul

View solution in original post

5 Replies
1,096 Views
paulvlase
NXP Employee
NXP Employee

Hi youngkugpark‌,

I tried to run your models and indeed the PTA10 LED on the MPC5748G board is not blinking and the CAN communication is not working. The problem is that the FlexCAN ISR is initialized before FlexCAN module. The fix is to set the priority of the FCAN_Config block to 1. This way the code is generated for FCAN_Config block before the FCAN_ISR.

Right click on the FCAN_Config block, select Properties, and set the Priority field to 1.

Regards,

Paul

1,095 Views
youngkugpark
Contributor III

Hello, Paul Blase.


Thank you for pointing out that you can review and modify my stupid model.
Thanks to you, I have saved a lot of time.
1,095 Views
paulvlase
NXP Employee
NXP Employee

Hi youngkugpark‌,

It is our fault that we didn't include this priority check.

We will update the FlexCAN consistency check in the next cumulative patch or release.

1,095 Views
mariuslucianand
NXP Employee
NXP Employee

Hello youngkugpark‌,

Our responses are delayed due to the Christian Easter Holiday. I hope you understand.

However, how the bootloader works is not being changed from one release to another, so let's isolate if the problem is related to the CAN or Bootloader.

This installation seemed to work normally, but problems reoccurred in FlexCAN communication. 

1. When you say installation, are you referring to flashing the bootloader?

2. How do you download the generated code on the board, via UART communication?

3. Try flashing over the bootloader a simple GPIO example and see if the code works as expected or not.

4. If the GPIO example is not working, try flashing the generated elf file (GPIO or CAN example as well) directly using the S32DS bypassing the bootloader. This way, eliminating the bootloader we can see if the issue is related to the CAN or bootloader.

Hope this helps,

Marius

0 Kudos
1,095 Views
youngkugpark
Contributor III

Hi, Andrei

As you mentioned, I compiled the GPIO example and downloaded it and confirmed that it worked properly on two boards.
From this I knew there was no problem with the bootloader provided by NXP.

And the good news is that Paul Vlase advised me to modify the CAN example program, and confirmed that it worked normally on both boards.

Thank you, too, Paul Blase.