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.

How to set the pps output?

 I'm using the DK-TM4C129X board PG0 pin as PPS out, but it does not work.

I initialize the program as follow step.

1: enable the LWIP_PTPD in Lwipopts.h.

2: ROM_GPIOPinConfigure(GPIO_PG0_EN0PPS);

3: EMACTimestampPPSSimpleModeSet(EMAC0_BASE, EMAC_PPS_1HZ);

I focus on IEEE-1588 develpoment, when to relsease the ptpd example ?

Thanks for any help you can provide.

 

  • Have no experience yet - that board - nor that MCU.  (but 10+ years profitable efforts w/ARM MCUs - many makers)

    While your call to, "ROM_GPIOPinConfigure()" appears necessary - is it sufficient?  Is it not more normal/customary to make calls to, "ROM_GPIOPinType()" & to have properly enabled that host port  (Port G) & your targeted peripheral - as well?   No such evidence reveals - your brief code listing... 

    Usually a fault is generated by failure to enable a peripheral or hosting port - you make no such report.  "I can't get the PPS signal," exceeds famed, "Does not Work!" (always the part's fault - never the user) - but not by much...  "Can't get," is ripe for multiple interpretations - your humble, distant helpers may deserve better care/handling.

    You may wish to configure PG0 as a simple (gpio) output - then toggle & test/observe.  This will at minimum insure that the pin/routing are valid - and enhance your later PPS signal objectives...

  • I'm sorrry fo my bad English!

    I can't find the ROM_GPIOPinType() parameter for PPS configaration.

    I configrued the PG0 as a simple GPIO output, tested the pin is valid.

    Thanks for your attention!

     

  • Yan Hongyang said:

    I can't find the ROM_GPIOPinType() parameter for PPS configaration.

    Never even dawned upon me that could be an issue - one hopes that if a, "GPIOPinConfigure()" exists - the corresponding "GPIOPinType()" does too.  This may require those w/ "inside information" to step in/assist.

    Your English is far better than my French. 

    As last resort - you may benefit from running a, "Find in Files" search w/in your IDE - keying upon PPS and PinType.  Bon chance, mon ami...

  •  

    Yan,

    Wave has all of the proper defines.  For the code example that will be released...uses PH5 for the EN0PPS pin because of placement on the board goes to a breakout header.  The portion that defines/sets PH5 is below, apply similar concept to PG0:

    //*****************************************************************************
    //
    // Pulse Per Second (PPS) Output Pin Definitions.
    //
    //*****************************************************************************
    #define PPS_GPIO_PERIPHERAL     SYSCTL_PERIPH_GPIOH
    #define PPS_GPIO_BASE           GPIO_PORTH_BASE
    #define PPS_GPIO_PIN            GPIO_PIN_5
    #define PPS_PCTL_MASK           0xFFF0FFFF
    #define PPS_PCTL_VAL            0x00050000

        GPIOPadConfigSet(PPS_GPIO_BASE, PPS_GPIO_PIN, GPIO_STRENGTH_2MA,
                         GPIO_PIN_TYPE_STD);
        GPIODirModeSet(PPS_GPIO_BASE, PPS_GPIO_PIN, GPIO_DIR_MODE_HW);
        ulVal = HWREG(PPS_GPIO_BASE + GPIO_O_PCTL);
        ulVal &= PPS_PCTL_MASK;
        ulVal |= PPS_PCTL_WREG(PPS_GPIO_BASE + GPIO_O_PCTL) = ulVal;

    Lela

  • Thank you for your help very much!

  • Lela Garofolo said:
    Wave has all of the proper defines.

    Seems a bit too, "insider only" for this reporter.   "Wave" may not too heavily "blip" radar of many/most here...

  • HI Yan ,I focus on using DK-TM4C129X board to realize IEEE 1588. Do you have example code?Can you give me ?Thank you so much!!!