Hello.
I'm trying to read can messages in a port. I can read extended, but I cannot read any standard message. I have configured port as "mixed", but still I cannot read,. How can I configure it?
Do I need to generate pdu_ID per can message or can I read all of them and filter inside tha simulink code by comparing the ID with the expected ID?
Any example of reading standard/extended messages through the same port will be apprecited.
Miguel.
解決済! 解決策の投稿を見る。
Hello,
In order to receive CAN messages with standard ID, in your configuration project (S32 Configuration Tool or EB tresos), you need to explicitly set the Can ID Message Type field (under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject) to STANDARD:
For more information and a comprehensive example please have a look at this article: Communicating over the CAN Bus
Hello,
In order to receive CAN messages with standard ID, in your configuration project (S32 Configuration Tool or EB tresos), you need to explicitly set the Can ID Message Type field (under Can_43_FLEXCAN\CanConfigSet\CanHardwareObject) to STANDARD:
For more information and a comprehensive example please have a look at this article: Communicating over the CAN Bus
Hi Adrian.
Thanks a lot. It works now. The link you've given is related to MCUExpress utility. Do you have examples using EB Tresos?
Miguel.
In NXP’s Model-Based Design Toolbox for S32K3xx Series you can find many examples related to CAN and many other topics.
The CAN examples are located in these folders: NXP_MBDToolbox_S32K3xx\S32K3_Examples\can and NXP_MBDToolbox_S32K3xx\S32K3_Examples\MR-CANHUBK344
All the settings from the S32 Configuration Tool can be traced to the ones in EB tresos.
Nevertheless, the toolbox includes examples for EB tresos as well as examples for S32 Configuration Tool.
P.S. S32 Configuration Tool is NXP's proprietary tool for configuring S32K3xx MCUs. MCUXpresso is for IMXRT, DSC, LPC.
Hi Adrian.
Thanks for the response. I know where are located the examples. The problem here is that there is no an example combining standard, extended messages TX and RX. So, this is why I asked for a more complete example.
Good to know that the drivers configuration are exchangables between Tresos and NXP tool.
BR.
Miguel.
Hello,
In Can_Write (Tx) blocks, switching between the standard and extended ID formats can be done by choosing the appropriate Hardware Object that was previously configured (or created if necessary) with the desired Can ID Message Type setting in the configuration project in CanHardwareObject tab.
If, in the configuration project, the TRANSMIT CanHardwareObject was configured as MIXED (in Can ID Message Type), then the ID type can be changed directly from the Simulink model by applying the bitwise OR operation to the Message ID input of the Can_write block:
0x80000000 | desired_ID.
Example:
On the Rx side, a CanHardwareObject must be configured for each type of ID that you want to receive. Then the Object_ID output of the CanIf_RxIndication block can be checked to find out which CanHardwareObject has received the message. This gives you the information of the message ID type.