This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IEEE 1588 PTP - hardware assistance

Hi,

I am having a first look into the enet_ptpd example in order to see the IEEE 1588 implementation. After having browsed the code for quite some time, I can't find the spot where TIMER3 is being used to store ethernet timestamps as described in the data sheet. So far I could only discover the software only implementation of PTP. Would it be possible to get a few exact code locations withing the enet_ptpd example where hardware assisted PTP (ETHERNET + TIMER3) is being used?

Thanks a lot.

6 Replies

  • Which EK board are you using? Also, which version of StellarisWare do you have downloaded?

    For the EK-LM3S8962, if you look at the enet_ptpd example, you will find the function lwIPHostGetTime(...), which gets the software timestamp, and if the hardware feature is present, will use the timestamp captured in TIMER3B to adjust the software timestamp backwards to the actual packet reception time.

    Also, if you search through enet_ptpd.c for FLAG_HWTIMESTAMP, you will see how this feature is being detected and setup.

    --Bobby
  • Hi Bobby.

    Thanks for the quick reply. I have downloaded the latest firmware support package for lm3s9b92 from the ti.com website. The enet_ptpd.c file shows:

    This is part of revision 5821 of the EK-LM3S9B92 Firmware Package.

    There is no trace of FLAG_HWTIMESTAMP anywhere in the file, so maybe I have the wrong version. Which one should I get, and where from?

    Best Regards
  • The 9B92 device does not support this feature, so the code was not included. You can download the software package for the EK-LM3S8962 for an example of how to detect and enable this feature.

    --Bobby
  • Hi Bobby.

    I will try this, thanks. Is there a general rule in the model naming convention which hints support for IEEE 1588? Obviously I though all devices with a MAC will do the trick, but I guess I am wrong. Also, the diagram on the web which shows all system components of the 9 series contains a big IEEE 1588 logo:

    http://focus.ti.com/graphics/mcu/stellaris/Stellaris9000_400.jpg


    Best Regards.
  • I'm not aware of any part-numbering hints for 1588 support. The best thing that I can suggest is to browse to www.ti.com/stellaris, click on the "Documentation" tab, and download the Product Selector Guide spreadsheet. It is formatted in such a way as to allow you to filter parts based on various features, and 1588 is one of those features.

    --Bobby
  • In reply to Bobby Bradford:

    Hi Bobby,

    In your explanation you specified that timer 3B is used for hardware timestamping. I need to know how Timer3B is configured for capturing the time stamp of reciept of Ethernet packet.

                 TimerConfigure(TIMER3_BASE, (TIMER_CFG_16_BIT_PAIR |
                                             TIMER_CFG_A_PERIODIC |
                                             TIMER_CFG_B_CAP_TIME));
                TimerPrescaleSet(TIMER3_BASE, TIMER_BOTH, 0);
                TimerLoadSet(TIMER3_BASE, TIMER_BOTH, 0xFFFF);
                TimerControlEvent(TIMER3_BASE, TIMER_B, TIMER_EVENT_POS_EDGE);

    In the above snippet of code, it shows How timer 3B is configured for Capture mode. But my doubt is how does this timer know to timestamp for ethernet recieve packet.

    And also I am trying to modify the code for transmit time stamp using the other timers(Timer 2 or Timer 1 or Timer 0). I need know How to configure the timer for time stamping the transmit Ethernet packet.

    Please help on this. Thanks in Advance.

    Regards,

    Infant Jesuraj F

     

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.