Using LLCE as UART in S32G2RM

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

Using LLCE as UART in S32G2RM

Jump to solution
1,783 Views
naveenkumar_muthusamy
Contributor III

Hi all,

we are trying to make the LLCE to work as a four independent UART by using the LIN, 

Is this possible, Kindly provide the information regarding this

@s32g2rm

Tags (4)
0 Kudos
Reply
1 Solution
1,735 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Regarding the LLCE LIN message buffers, there are 8 bytes for each channel. This can be seen in the Section 3.3.2.10 struct Llce_Lin_SharedMemoryType in the LLCE firmware user guide.

As to recommendations regarding the LIN as UART, it seems there is a workaround for the polling mode, which is forwarding the interrupt to the Host core. I do apologize for the misunderstanding on our side with this topic.

Below will be some options recommended by NXP:

1. Implement UART driver on host side and enable LIN interrupt forwarding. Host core can access the LinFlex registers directly but interrupts of LLCE_LIN cannot be directly routed to host core. For routing LLCE LIN interrupts to host core, LIN interrupt forwarding can be enabled in LLCE FW and the steps to enable are explained in section “LIN Interrupt Forwarding” in LLCE FW user guide. No change required in the FW

2. Implement UART driver on host side with polling. And make sure the host core do not send any LIN related commands to LLCE FW which would result in unpredictable behavior. No change required in the FW.

3. Remove LIN based FW and implement UART based FW in LLCE FW. This would require FDK license.

Please, let us know if this information was helpful or not.

View solution in original post

0 Kudos
Reply
5 Replies
1,740 Views
naveenkumar_muthusamy
Contributor III

HI @Daniel-Aguirre ,

 

Thanks for the Details, It was helpful, 

What is the FIFO size of the LLCE and  i am trying to configure the LIN as UART in LLCE, any recommendations?

0 Kudos
Reply
1,736 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Regarding the LLCE LIN message buffers, there are 8 bytes for each channel. This can be seen in the Section 3.3.2.10 struct Llce_Lin_SharedMemoryType in the LLCE firmware user guide.

As to recommendations regarding the LIN as UART, it seems there is a workaround for the polling mode, which is forwarding the interrupt to the Host core. I do apologize for the misunderstanding on our side with this topic.

Below will be some options recommended by NXP:

1. Implement UART driver on host side and enable LIN interrupt forwarding. Host core can access the LinFlex registers directly but interrupts of LLCE_LIN cannot be directly routed to host core. For routing LLCE LIN interrupts to host core, LIN interrupt forwarding can be enabled in LLCE FW and the steps to enable are explained in section “LIN Interrupt Forwarding” in LLCE FW user guide. No change required in the FW

2. Implement UART driver on host side with polling. And make sure the host core do not send any LIN related commands to LLCE FW which would result in unpredictable behavior. No change required in the FW.

3. Remove LIN based FW and implement UART based FW in LLCE FW. This would require FDK license.

Please, let us know if this information was helpful or not.

0 Kudos
Reply
1,765 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

At this moment, there is no example available which supports UART over LLCE LINs. If needed, the recommendation is to do it in polling mode, due to the interruption for LIN being routed to the LLCE internal cores and not to the Host's directly.

You can take a look into the LLCE User Guide of your specific version to see what it available at this moment. You can find the UG following:

"C:\nxp\S32G_LLCE_1_0_4\firmware\llce_interface\doc\LLCE_firmware_user_guide.pdf"

In here, it is explained what is available for your specific version without the need of modifications.

Please, let us know if this information was helpful or not.

0 Kudos
Reply
1,756 Views
naveenkumar_muthusamy
Contributor III

Hi @Daniel-Aguirre ,

Thanks for your Reply. as per your reply i understand that UART can be configured in LLCE. but is it can be used  only in the polling mode?

is there a way, where we can configure the UART in the interrupt mode for only reception

0 Kudos
Reply
1,752 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Given that the interrupts of the LIN modules from the LLCE peripheral are directly mapped to the internal cores (M0+) and not to the application cores or host (M7 or A53), the interrupt will never arrive to the host directly, that is why the support for UART is said to be in polling mode.

Please, let us know if this information was helpful or not.

0 Kudos
Reply