I2C / FlexIO: HLD(MCAL) vs LLD

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

I2C / FlexIO: HLD(MCAL) vs LLD

Jump to solution
812 Views
Vojtech
Contributor II

Hello,

I am new in NXP products and I am trying to understand its eco system. I need to implement I2C in non-Autosar application, so I would need to understand how it works here, so I had some questions:

1)

In RTD_I2C_UM.pdf is written:

"The I2c driver is implemented as an Autosar complex device driver. It uses the LPI2c and FlexIO hardware peripheral which provides support for implementing the I2c protocol. The I2c driver implements both master and slave mode for LPI2c channels and only master for FlexIO channels. The driver offers a hardware independent API to the upper layer that can be used to configure the"    ……   

" Physical I2c Channels: LPI2C_0, LPI2C_1, FlexIO"

 Additionally in all the examples for I2C which I have found is used FlexIO.

So do I understand correctly that if I want to use I2C RTD driver (HLD or LLD), so I always have to use FlexIO as well? If yes, so what is the reason for that? Why LPI2C_0 /LPI2C_1 peripheral is not enough for I2C RTD?

2)

If I developed AUTOSAR application so I have to use HLD (MCAL) I2C driver that is clear to me. But if developed non-Autosar application, so is there any drawback if I use HLD (MCAL) driver ? What are the decision factors that need to be taken into accout (If RTOS is used and there are no issues with LPI2C_0 /LPI2C_1 pins positions)?

3)

In AN13435 is written "In the S32 Configuration Tool both HL and IP interfaces of the driver can be configured.."  Do I understand correctly that HL is the same in this context as HLD ( MCAL) and IP (Intellectual property) in this context is the same as LLD? So If I see in any source file name written "IP" so it is always LLD?

I see the same logic here:

Vojtech_3-1690190298614.png

 

4)

As I understand so I2C driver is implemented as CDD and provides API for HLD (HLI) and LLD (LLI). As I understand in picture below under "MCAL" tab are written HLD drivers and under "Drivers" tab are written LLD drivers. Is it right? Why CDD is used in MCAL tab only ? LLD is implemented in CDD as well, right?

 

Vojtech_4-1690190298616.png

 

Why there is not used "IP" in upper picture in tab "Drivers" for I2C LLD driver?

In picture below is "_IP" used for LLI (LLD).

Vojtech_5-1690190298618.png

 

Real-Time Drivers (RTD) for S32G Product Brief (nxp.com)

 

Thank you for any hints

0 Kudos
Reply
1 Solution
785 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

1) No, marked sentence clearly says LPI2C module can be used. It is possible example does not exist for all options or derivatives. Or it does not exist in certain RTD release. For instance I can see it with my installation:

davidtosenovjan_0-1690368584174.png

 

2)  You have mentioned AN13435, it is well described in the first section (on the second page):

https://www.nxp.com/docs/en/application-note/AN13435.pdf

Drawback for HLD use in non-AUTOSAR application could be if you needs to implement something what is not prepared or defined in AUTOSAR. So limitation for non-AUTOSAR application would be that all these drivers are based on AUTOSAR definitions.

 

3) Yes, you understand it right.

 

4) Yes, you are right. I am not sure why it is marked this way in S32DS, to be honest. Apparently just is based on AUTOSAR, so it uses its terminology.

View solution in original post

0 Kudos
Reply
2 Replies
693 Views
Vojtech
Contributor II

Hello David, I forgot to reply. Thank you for your answer, it helped me !

0 Kudos
Reply
786 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

1) No, marked sentence clearly says LPI2C module can be used. It is possible example does not exist for all options or derivatives. Or it does not exist in certain RTD release. For instance I can see it with my installation:

davidtosenovjan_0-1690368584174.png

 

2)  You have mentioned AN13435, it is well described in the first section (on the second page):

https://www.nxp.com/docs/en/application-note/AN13435.pdf

Drawback for HLD use in non-AUTOSAR application could be if you needs to implement something what is not prepared or defined in AUTOSAR. So limitation for non-AUTOSAR application would be that all these drivers are based on AUTOSAR definitions.

 

3) Yes, you understand it right.

 

4) Yes, you are right. I am not sure why it is marked this way in S32DS, to be honest. Apparently just is based on AUTOSAR, so it uses its terminology.

0 Kudos
Reply