About adding CAN2CAN routing route

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

About adding CAN2CAN routing route

2,348 Views
kazuki
Contributor II

Please tell me about adding a CAN2CAN routing route.

LLCE also uses "Can_Llce_DS_Can2Can_S32G399A_M7" included in the module to confirm operation.

The operation confirmed environment is as follows.
S32DS:Ver3.5 Build ID: 240130 (Update 10)
Debug Probe:S32 Debug Probe
LLCE:S32G_LLCE_1_0_5_QLP1
PFE:PFE-DRV_S32G_M7_MCAL_RTM_1.0.0_QLP1
Compiler:GCC v9.2
tresosStudio:Ver28.2
Board used: S32G-VNP-RDB3

I wanted to route a new CANID and route, so I added HWobject and CanAdvancedFeature to CAN0.
For HWobject, I reused the CAN_Mb_Type used in CAN2CAN routing from receive and confirmed it by changing HWFiter and Can Advanced Feature.
The configuration was done with S32DS.


Conventional routing from BCAN0 to BCAN15 was successful.
However, the routing from BCAN0 to BCAN1 could not be confirmed.

Originally, BCAN1 only had HW objects for transmission, but
Are there any settings other than HWobject and CanAdvancedFeature that are required for BCAN1 routing?

0 Kudos
Reply
8 Replies

2,165 Views
kazuki
Contributor II

hello

Restart CAN2CAN sample project
I reconfigured the settings so that the CAN frames received on BCAN0 are routed to BCAN2.

Still, it didn't work, so I tried investigating the cause.
When I checked the circuit diagram of the S32G-VNP-RDB3 board, 3.3V was supplied to TXD, EN, and STB for the BCAN0 transceiver.
In BCAN1, 3.3V was not supplied to TXD, EN, and STB for the transceiver.

Therefore, we assume that routing is not possible in combination with BCAN where 3.3V is not supplied.

I'm not sure if this is the right place to address the question, but
What should I do to supply power to BCAN1, BCAN3, BCAN5, BCAN7, BCAN9, BCAN11, BCAN13, BCAN15?

0 Kudos
Reply

2,149 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Since the base example uses BCAN_1 as the first node, all voltages should be applied correctly given that we are seeing the example running no problem from our side, can you confirm that the voltages are applied correctly under the base example (no modifications)?

As a note, CAN Bus requires a minimum of 2 nodes to work correctly, if you are routing a message to a floating node (i.e. is the only node on the specific CAN bus), then an error is transmitted on the bus and goes to standby. For what you are telling, we understand that BCAN_2 is left floating, which is incorrect.

Can you help us elaborate more on how you probed the signals you are saying?

For the following part of the schematic of RDB3 (which you previously said you are using), we see the following:

DanielAguirre_0-1709902863249.png

Where BCAN_0 and BCAN_1 share the control signals (EN and STB), for which if BCAN_0 is being enabled, BCAN_1 is also enabled. Are you using an NXP reference board? Or is this a custom board?

As for the available BCAN's, all BCAN's are being supplied with the necessary voltages, as seen under the RDB3 schematic, unless it was modified or it is a custom board.

Another situation is that if the signals are not configured correctly, the voltages are not applied correctly. Could be another possibility. But given the example configures all pins, this should not be the problem.

Please, let us know.

0 Kudos
Reply

2,225 Views
kazuki
Contributor II

hello

I would like to share my project.

This project adds BCAN2 to send CAN ID 0x111 externally.
It is assumed that BCAN0 is routed to BCAN2.

All CAN object IDs are also set to unique ones.

Board used: S32G-VNP-RDB3.

I hope I know the cause.

thank you.

0 Kudos
Reply

2,198 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We seem to be misunderstanding the overall idea behind the project you are building. We do apologize.

We see the following infinite loop being created:

DanielAguirre_0-1709822622477.png

But nothing is being done. We understand that all controllers are being initialized and nothing else.

Also, under the HardwareObjects, we see that no reference to BCAN_2 was created, can you help us verify this?

Can you help us verify that the example works as expected from your side (no modifications) then start modifying from there? We recommend first start moving the BCAN's to a different channel to understand that your configurations on regards of routing is correct, not adding new routing rules.

Please, let us know.

0 Kudos
Reply

2,244 Views
kazuki
Contributor II

hello

thank you for your reply.

The changes made to the basic sample are as follows.

New addition to CanHadWareObject in Can_43_LLCE module,
Additional content

Name CanHardwareObject_11
CanHandleType BASIC
CanIdType STANDARD
CanObjectId 9
CanObjectType RECEIVE
CanTxAddFrameMac false
CanHardwareObjectUsesPolling false
CanControllerRef /Can_43_LLCE_1/Can/CanConfigSet/CanController_1
CanHwObjectCount 20
CanObjectPayloadLength CAN_OBJECT_PL_64
Name CanHwFilter
CanHwFilterCode 273
CanHwFilterMask 2047
CanAdvancedFeature
CanAdvancedFeatureRef" value="/Llce_Af_1/Llce_Af/LlceAfGeneral/CanAdvancedFeature_4

New addition to LlceAfGneral in Llce_Af module,

Name CanAdvancedFeature_4
LoggingFeatureEnable false
HostReceiveEnable false
AuthenticationFrameEnable false
CustomProcessingEnable false
CustomProcessingIndex 0
array name Can2CanRoutingEnable
Name Can2CanRoutingEnable
name Can2CanRoutingTableRef value="/Llce_Af_1/Llce_Af/LlceAfGeneral/Can2CanRoutingTable_4"/

Name Can2CanRoutingTable_4
CanFd2Can false
Can2CanFd false
Name CanDestinationList_0
name Can2CanControllerRef value /Can_43_LLCE_1/Can/CanConfigSet/CanController_1
After adding this setting, the routing from BCAN0 to BCAN1 could not be confirmed.

I tried setting it to BCAN2 and checking it.
Copy the settings of CanController_15 (BCAN15) of CanController and set BCAN2,
I set CanAdvancedFeature_4.

The initials in main include Can_43_LLCE_SetBaudrate, Can_43_LLCE_SetControllerMode, and Can_43_LLCE_GetControllerErrorState.
Even when I tried to start BCAN2 using this, I could not confirm the routing.

I would also appreciate if you could let me know how an infinite loop of sent and received messages can cause undefined behavior.

thank you.

0 Kudos
Reply

2,237 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. We seem to be misunderstanding the configurations you are implementing, since CAN Object ID 9 is already being used under the example:

DanielAguirre_0-1709749460386.png

Did you modify this option or did you modify several configurations? We can recommend opening a ticket under the NXP online services if you are unable to share your project under the public community, since it might be better for the team to look directly into all the configurations of your project.

We do apologize.

Please, let us know.

0 Kudos
Reply

2,191 Views
kazuki
Contributor II

hello

thank you for your reply.

The changes made to the basic sample are as follows.

New addition to CanHadWareObject in Can_43_LLCE module,
Additional content

Name CanHardwareObject_11
CanHandleType BASIC
CanIdType STANDARD
CanObjectId 9
CanObjectType RECEIVE
CanTxAddFrameMac false
CanHardwareObjectUsesPolling false
CanControllerRef /Can_43_LLCE_1/Can/CanConfigSet/CanController_1
CanHwObjectCount 20
CanObjectPayloadLength CAN_OBJECT_PL_64
Name CanHwFilter
CanHwFilterCode 273
CanHwFilterMask 2047
CanAdvancedFeature
CanAdvancedFeatureRef" value="/Llce_Af_1/Llce_Af/LlceAfGeneral/CanAdvancedFeature_4

New addition to LlceAfGneral in Llce_Af module,

Name CanAdvancedFeature_4
LoggingFeatureEnable false
HostReceiveEnable false
AuthenticationFrameEnable false
CustomProcessingEnable false
CustomProcessingIndex 0
array name Can2CanRoutingEnable
Name Can2CanRoutingEnable
name Can2CanRoutingTableRef value="/Llce_Af_1/Llce_Af/LlceAfGeneral/Can2CanRoutingTable_4"/

Name Can2CanRoutingTable_4
CanFd2Can false
Can2CanFd false
Name CanDestinationList_0
name Can2CanControllerRef value /Can_43_LLCE_1/Can/CanConfigSet/CanController_1
After adding this setting, the routing from BCAN0 to BCAN1 could not be confirmed.

I tried setting it to BCAN2 and checking it.
Copy the settings of CanController_15 (BCAN15) of CanController and set BCAN2,
I set CanAdvancedFeature_4.

The initials in main include Can_43_LLCE_SetBaudrate, Can_43_LLCE_SetControllerMode, and Can_43_LLCE_GetControllerErrorState.
Even when I tried to start BCAN2 using this, I could not confirm the routing.

I would also appreciate if you could let me know how an infinite loop of sent and received messages can cause undefined behavior.

thank you.

0 Kudos
Reply

2,314 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Can you help us share the modifications done to the base example? For us to verify the overall configuration.

Also, we understand that you are using the same interfaces as the example, is this correct? In which BCAN_1 starts communication and sends information to BCAN_0. Since you are configuring an internal routing from BCAN_0 again to BCAN_1 this might cause undefined behavior due to the infinite loop of messages being sent/received. 

Are you able to change the initial interface to another BCAN (not used by the example, i.e. BCAN_2)?

Please, let us know.