MBD Toolbox for MPC57xx Version 3.0 FCAN_Receive Blocking Mode

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

MBD Toolbox for MPC57xx Version 3.0 FCAN_Receive Blocking Mode

4,128 Views
chenli2
Contributor II

Hello,

1.) Is anyone using the Toolbox for MPC57xx Version 3.0? If so,

2.) Have you used FCAN_Receive with Blocking Mode? If so,

3.) Can you share your model with JUST FCAN_Receive blocks with Blocking Mode? I only want to see if there is someone who actually can use it.

Thanks,

Li

Labels (3)
0 Kudos
Reply
8 Replies

3,890 Views
chenli2
Contributor II

Finally new version 3.2 fixed the error for CAN receive blocking mode. But it only did half of the job. The help description doesn't match the actual block set. And there is no example. I don't even know how to make it working. Come on, NXP engineers! you guys can do better job than this!

CAN Receiver_BlockingMode2.JPGCAN Receiver_BlockingMode.JPG

0 Kudos
Reply

3,890 Views
paulvlase
NXP Employee
NXP Employee

Hi chenli@lincontrol.com‌,

You can find examples for FCAN Send/Receive Blocking mode in the <MBDT_ROOT>/MPC_Examples/mpc574x/fcan folder:

  • flexcan_echo_blocking_mpc574x, for MPC5744P.
  • flexcan_echo_blocking_mpc574xg.mdl, for MPC5748G.
  • flexcan_echo_blocking_mpc574xr.mdl, for MPC5746R.

and in <MBDT_ROOT>/MPC_Examples/mpc577x/fcan folder:

  • flexcan_echo_mpc5777c.mdl, for MPC5777C.

The <MBDT_ROOT> is the folder where the toolbox is installed. To find it, you can run mbd_find_mpc_root() command in Matlab console or navigate to it from the Add-On Manager window.

The outputs of the blocking FCAN_Receive block are:

  • Status (enum)
  • ID (uint8)
  • Data (uint8(8))
  • Length (uint8)
  • Timestamp (uint16)

The Status and ID output labels from the FCAN_Receive block are hidden under the NXP logo. Resize the block and make it bigger to see all output labels.

The output of the blocking FCAN_Send is:

  • Status (enum)

Status enum output is a Simulink enumeration mapped to the status_t C enum from SDK. Supported values for FCAN are:

  • status_t.STATUS_SUCCESS if successful
  • status_t.STATUS_TIMEOUT if the timeout is reached
  • status_t.STATUS_BUSY if another receive/send using the same message buffer is in progress

To see the values of the status_t enumeration, type in Matlab console status_t. and press the TAB key.

Check the example models to see how to use the status output.

Thank you for reporting this issue. I will update the help page in a future release or cumulative patch.

Regards,

Paul

0 Kudos
Reply

3,890 Views
hubeiren
Contributor II

Hi Paul,
Thanks for your reply to my post. I have checked the examples and there are some example for CAN Send blocking mode. But there is  no example for CAN receiving with blocking mode. Can you send me a simple example of CAN receiving with blocking mode? 
Best regards,
Li

0 Kudos
Reply

3,890 Views
juliana_rojas30
Contributor III

Hello there!

Would you please share the MPC57xx example for the sending fcan blocking mode ? I am working on the s32k14 but I need references of how to use it and I can't find examples for this issue.

Thanks!

0 Kudos
Reply

3,890 Views
hubeiren
Contributor II

So I am the only one who has this problem? NXP doesn't care about this issue?

0 Kudos
Reply

3,890 Views
chenli2
Contributor II

Hello,

Without Blocking mode, all CAN received messages have to be processed in ISR (Interrupt). It's unrealistic for automotive application. Does anyone has alternative solution?

Thanks,

Li 

0 Kudos
Reply

3,890 Views
chenli2
Contributor II

Error2.JPG

0 Kudos
Reply

3,890 Views
chenli2
Contributor II

Error1.JPG

0 Kudos
Reply