Is there a preferred way to write to the PHY using MQX/RTCS ?

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

Is there a preferred way to write to the PHY using MQX/RTCS ?

513 Views
jpa
Contributor IV

I _think_ I may need to issue a soft reset to the PHY under some circumstances.  I can see how to do this at the lower levels of the PHY driver, but there's quite a few MQX layers between my application code and the PHY driver.  Is there an access API that I'm missing?  I see function calls like *_mii_write, but they don't seem to make it up to the top where all I "know" is the default device number. 

John

Labels (1)
Tags (3)
0 Kudos
1 Reply

332 Views
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi John,

There is not an API to do what you want. However, you maybe could try this:

ENET_CONTEXT_STRUCT_PTR enet_ptr = NULL;

enet_ptr = _mqx_get_io_component_handle(IO_ENET_COMPONENT);

enet_ptr->PARAM_PTR = &ENET_default_params[0];

(*param_ptr->ENET_IF->MAC_IF->PHY_WRITE)(enet_ptr, reg_index, data, timeout);

For more reference, I came out with the adobe code based on the ENET_initialize_ex() function. I didn't tested so you will need to check and see if compiles and works. I hope this helps you.

Best Regards,

Garabo

0 Kudos