How to use LLCE on multihost mode

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

How to use LLCE on multihost mode

Jump to solution
1,270 Views
Siyan
Contributor III

Hi, NXP Experts,

I have some questions about how to use LLCE on multihost mode.

Q1: From the LLCE Firmware user guide, we know the LLCE only support two HIFs.

What should we do if there're more than two host cores need access BCAN.

For example, A53 run Linux, M7-0 run AUTOSAR and M7-1 run FreeRTOS all need transmit or receive CAN message by BCAN controller.

Q2: The two HIFs supported by LLCE, must configured controllers 0-7 to one HIF and controllers 8-15 to the other HIF.

Does it possible to configure controllers 0-2 to one HIF and controllers 3-15 to the other HIF.

Q3: How to delivery one received CAN message to M7-0, M7-1 and A53. 

0 Kudos
1 Solution
1,229 Views
nxf47223
NXP Employee
NXP Employee

Hi, 

Added other possible answers to the questions: 

A1: LLCE was designed to support maximum 2 master host cores (with full control). Besides, an extra logging path can be used to receive frames to the 3rd core. This means that TX path supports only 2 host cores, and RX path supports 3 cores.  

A2:  LLCE allows flexible allocation of CAN controllers to any HIF. This concept enables the mapping of CAN channels (BCAN, hw channel, CAN controller) to any output FIFO (output interface) for RX and TXACK events. (e.g CAN controllers0,1,2 can be serviced by Llce_Can_u32RxoutBaseAddress[0] and by Llce_Can_u32TxackBaseAddress[0] (or any of the group FIFOs RXOUT 0-7 and TXACK 0-7 that is routed to HIF0 in the corresponding IRSPRC) and CAN controllers 3,4,..,15 can be serviced by Llce_Can_u32RxoutBaseAddress[8] and by Llce_Can_u32TxackBaseAddress[8] (or any of the group RXOUT 8-15 and TXACK 8-15 that is routed to HIF1 in the corresponding IRSPRC)
The input FIFOs for TX messages are linked to the corresponding CAN controllers based on 1:1 mapping (e.g FIFOs Llce_Can_u32BlroutBaseAddress[3] and Llce_Can_u32BlrinBaseAddress[3] are dedicated to CAN controller 3)

A3: LLCE has an unique RXOUT path to delived the RX message to the host and a logging path (FIFO Llce_Can_u32RxinLogBaseAddress[0]) used to deliver to a logging core. By design, LLCE can send an RX message to a single host core only, and this was driven by Autosar world where a CAN controller can belong to a unique host software stack.
Possible workaround: Configure a filter which delivers the message to the host core (this can be M7-0), to the logging core (this can be A53) and configures a CAN2CAN routing rule that forwards the RX frame to another controller which belongs to e.g. M7-1 host and it's configured in self-receive and (optionally) internal loopback mode.

View solution in original post

0 Kudos
6 Replies
1,230 Views
nxf47223
NXP Employee
NXP Employee

Hi, 

Added other possible answers to the questions: 

A1: LLCE was designed to support maximum 2 master host cores (with full control). Besides, an extra logging path can be used to receive frames to the 3rd core. This means that TX path supports only 2 host cores, and RX path supports 3 cores.  

A2:  LLCE allows flexible allocation of CAN controllers to any HIF. This concept enables the mapping of CAN channels (BCAN, hw channel, CAN controller) to any output FIFO (output interface) for RX and TXACK events. (e.g CAN controllers0,1,2 can be serviced by Llce_Can_u32RxoutBaseAddress[0] and by Llce_Can_u32TxackBaseAddress[0] (or any of the group FIFOs RXOUT 0-7 and TXACK 0-7 that is routed to HIF0 in the corresponding IRSPRC) and CAN controllers 3,4,..,15 can be serviced by Llce_Can_u32RxoutBaseAddress[8] and by Llce_Can_u32TxackBaseAddress[8] (or any of the group RXOUT 8-15 and TXACK 8-15 that is routed to HIF1 in the corresponding IRSPRC)
The input FIFOs for TX messages are linked to the corresponding CAN controllers based on 1:1 mapping (e.g FIFOs Llce_Can_u32BlroutBaseAddress[3] and Llce_Can_u32BlrinBaseAddress[3] are dedicated to CAN controller 3)

A3: LLCE has an unique RXOUT path to delived the RX message to the host and a logging path (FIFO Llce_Can_u32RxinLogBaseAddress[0]) used to deliver to a logging core. By design, LLCE can send an RX message to a single host core only, and this was driven by Autosar world where a CAN controller can belong to a unique host software stack.
Possible workaround: Configure a filter which delivers the message to the host core (this can be M7-0), to the logging core (this can be A53) and configures a CAN2CAN routing rule that forwards the RX frame to another controller which belongs to e.g. M7-1 host and it's configured in self-receive and (optionally) internal loopback mode.

0 Kudos
1,189 Views
Siyan
Contributor III

Hi,

I have some questions about your A2 content.

Q1: "CAN controllers 3,4,..,15 can be serviced by Llce_Can_u32RxoutBaseAddress[8] and by Llce_Can_u32TxackBaseAddress[8] (or any of the group RXOUT 8-15 and TXACK 8-15 that is routed to HIF1 in the corresponding IRSPRC)", dose it mean the mapping of CAN controllers to FIFO could be n:1?

Q2: How to configure this function in 'Can_43_LLCE_TS_T40D11M10I4R0', can't find related configuration items.

0 Kudos
1,185 Views
nxf47223
NXP Employee
NXP Employee
Hi,

Yes, mapping can be n:1.
The feature was introduced starting with 1.0.5 release. Check LLCE_firmware_user_guide.pdf, Changelog chapter.
0 Kudos
823 Views
Siyan
Contributor III

Hi, @nxf47223 

I configured BCAN0~BCAN2 to HIF0 in M7-0 software and BCAN3~BCAN11 to HIF1 in M7-1 with the MCAL module CAN_43_LLCE.

But i'm not sure how to configure the routing rule between BCAN0~BCAN2 and BCAN3~BCAN11.

As we know, in LLCE_AF->CanDestinationList, the reference CAN controller should configured in Can_43_LLCE->CanController. But the BCAN3~BCAN11 belong to HIF1 which shouldn't configure in M7-0 Can_43_LLCE->CanController list. So i can't select  BCAN3~BCAN11 as destination in M7-0 LLCE_AF module. 

How to solve this conflict?

0 Kudos
807 Views
nxf47223
NXP Employee
NXP Employee

Hi Siyan,

In M7-0 Can_43_LLCE->CanController list, you can add dummy entries for BCAN3~BCAN11. Set for them the field "CanControllerActivation" to false. This is equivalent to the CAN controller not being used in the configuration, but being able to reference them in LLCE_AF->CanDestinationList.

 

0 Kudos
1,248 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Below will be some comments regarding you questions:

Q1 >> What should we do if there're more than two host cores need access BCAN.

A1 >> One possibility is using IPCF for one service core to be able to propagate the message further into the system. Other possibility is using the FlexCAN available channels which are not dependent on the LLCE restriction.

 

Q2 >> Does it possible to configure controllers 0-2 to one HIF and controllers 3-15 to the other HIF.

A2 >> The interrupts are divided into 2 groups, from 0 to 7 an from 8 to 15 and each entire group is assigned to one controller. It is recommended to partition the groups are per the interrupt registers are designed. 

 

Q3 >> How to delivery one received CAN message to M7-0, M7-1 and A53. 

A3 >> As said in A1, IPCF could be one mechanism that can be used to communicate between the different cores available in S32G platform.

 

Please, let us know.

0 Kudos