Issues with 1588 on K60 at 10 Mbps

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

Issues with 1588 on K60 at 10 Mbps

941 Views
loichoarau
Contributor II


Hello,

I am running the 1588 Demo application coming with MQX_4_2 on a TWRK60F120m. It is working at 100 MBps, but not when I switch my ethernet baud rate to 10 Mbps. In that case, the program crashes after 5s of starting of running and sending PTP frames.

I get the error message attached in the serial console:

"DBG: Inst: 0 Unit MST - Error #1 - at PTP time 205247740.000000010"

I traced it to the error handler "void MQX1588_OnError" (Line 111 in mqx1588user.c) returning the code e_SEVC_NOTC (/* Notice: normal but significant condition */). After that, the target crashes.

This calls is originating from the ixxat compiled libraries. Anybody had the same issues and knows a workaround? Or is there a patch to apply to the PTP libraries?

Thanks and regards

Loic

0 Kudos
2 Replies

611 Views
soledad
NXP Employee
NXP Employee

Hi,

RMII does not support speed change.
To operate with old 10 hubs, you must configure ENET to 10. But in this case you will not able to connect to your PC.
MII mode does not have this issue.

In order to change RMII to MII under MQX, you need at minimum:

1. Add the port initialization in init_gpio.c file.

2. Change ENET_OPTION_RMII to ENET_OPTION_MII in ENET_default_params initialization.

3. If you are using different phy change your configuration properly in phy_ksz8041.c (or the phy you are using)

4. Then I think it also changes the way the core clocks are sourced (in RMII they have to be synchronous with PHY, in MII they don’t) MII uses 25MHz clock input so  J2 on TWR-SER sould be set to 1-2.

5. - No shunt across any pin on J12 of TWR-SER.

  Please let me know if this helps,

Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

611 Views
loichoarau
Contributor II

Hi Soledad,

Thanks for your reply.

I realize I forgot to mention that the 10 Mbps network is stable and working well if I disable the PTP program (actually both RMII and MII work. Using MII requires extra wiring to connect all the signals from the processor to the PHY). I had done the required changes in init_gpio.c, init_enet and my jumper configuration is correct to with use the ksz8041 PHY. I can perform any operations over TCP/IP at 10 Mbps afterwards.

My problem seem to really be in the 1588 Demo application, and more specifically in the ixxat compiled PTP libraries, just as if it does not properly handle an error condition after sending a few frames. I suspect it is not able to time frames precisely at 10 Mbps and correct the offset as it should, and it is maybe throwing that error.

Thanks and regards

Loic

0 Kudos