How to check received Eth frames using MCAL drivers?

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

How to check received Eth frames using MCAL drivers?

935 Views
Lambert_Yang
NXP Employee
NXP Employee

Hi.

This question exists both in MPC5777C MCAL4.0 or MCAL4.3.

When I want to check the received Eth frames, I used to check them in function EthIf_RxIndication. But this way is kind of weird. EthIf_RxIndication is defined in Ethif_Cbk.c which is a source file of MCAL drivers. That means I have to add my codes in Eclipse plugin codes, which is a bad way for porting.

Compared with the CAN module, similar functions like CanIf_RxIndication are only declared in Canif_Cbk.h using extern and there isn't a Canif_Cbk.c in MCAL drivers to define them either. So I can implement CanIf_RxIndication in my file and also check received CAN frames there.

So what is a better way to check received Eth frames using MCAL drivers?

Tags (2)
0 Kudos
3 Replies

861 Views
namnguyenviet
NXP Employee
NXP Employee

Hi Lambert Yang,

EthIf and CanIf are all stubs component in MCAL driver packages, which means their existence of source files (if have) only in order to avoid compile errors and component testing. Therefore, it's not mandatory to add source files and define Interface API like an empty function (like EthIf), or avoid implement source files and using "extern" keyword (like CanIf)

Normally when testing Eth driver, or create Eth sample application, in order to checking receive frame, we often don't add EthIf_Cbk.c into source list for compiling, and declare and implement EthIf_RxIndication in user's file (maybe main.c or other common file)

0 Kudos

861 Views
Lambert_Yang
NXP Employee
NXP Employee

Thanks, Nam. Sorry, I mistake you for Hung.

0 Kudos

861 Views
Lambert_Yang
NXP Employee
NXP Employee

I see. Thanks Hung.

0 Kudos