2 * @file IxTimeSyncAcc.h
4 * @author Intel Corporation
7 * @brief Header file for IXP400 Access Layer to IEEE 1588(TM) Precision
8 * Clock Synchronisation Protocol Hardware Assist
13 * IXP400 SW Release version 2.0
15 * -- Copyright Notice --
18 * Copyright 2001-2005, Intel Corporation.
19 * All rights reserved.
22 * SPDX-License-Identifier: BSD-3-Clause
24 * -- End of Copyright Notice --
28 * @defgroup IxTimeSyncAcc IXP400 Time Sync Access Component API
30 * @brief Public API for IxTimeSyncAcc
34 #ifndef IXTIMESYNCACC_H
35 #define IXTIMESYNCACC_H
46 * @ingroup IxTimeSyncAcc
48 * @enum IxTimeSyncAccStatus
50 * @brief The status as returned from the API
52 typedef enum /**< IxTimeSyncAccStatus */
54 IX_TIMESYNCACC_SUCCESS = IX_SUCCESS, /**< Requested operation successful */
55 IX_TIMESYNCACC_INVALIDPARAM, /**< An invalid parameter was passed */
56 IX_TIMESYNCACC_NOTIMESTAMP, /**< While polling no time stamp available */
57 IX_TIMESYNCACC_INTERRUPTMODEINUSE, /**< Polling not allowed while operating in interrupt mode */
58 IX_TIMESYNCACC_FAILED /**< Internal error occurred */
62 * @ingroup IxTimeSyncAcc
64 * @enum IxTimeSyncAccAuxMode
66 * @brief Master or Slave Auxiliary Time Stamp (Snap Shot)
68 typedef enum /**< IxTimeSyncAccAuxMode */
70 IX_TIMESYNCACC_AUXMODE_MASTER, /**< Auxiliary Master Mode */
71 IX_TIMESYNCACC_AUXMODE_SLAVE, /**< Auxiliary Slave Mode */
72 IX_TIMESYNCACC_AUXMODE_INVALID /**< Invalid Auxiliary Mode */
73 }IxTimeSyncAccAuxMode;
76 * @ingroup IxTimeSyncAcc
78 * @enum IxTimeSyncAcc1588PTPPort
80 * @brief IEEE 1588 PTP Communication Port(Channel)
82 typedef enum /**< IxTimeSyncAcc1588PTPPort */
84 IX_TIMESYNCACC_NPE_A_1588PTP_PORT, /**< PTP Communication Port on NPE-A */
85 IX_TIMESYNCACC_NPE_B_1588PTP_PORT, /**< PTP Communication Port on NPE-B */
86 IX_TIMESYNCACC_NPE_C_1588PTP_PORT, /**< PTP Communication Port on NPE-C */
87 IX_TIMESYNCACC_NPE_1588PORT_INVALID /**< Invalid PTP Communication Port */
88 } IxTimeSyncAcc1588PTPPort;
91 * @ingroup IxTimeSyncAcc
93 * @enum IxTimeSyncAcc1588PTPPortMode
95 * @brief Master or Slave mode for IEEE 1588 PTP Communication Port
97 typedef enum /**< IxTimeSyncAcc1588PTPPortMode */
99 IX_TIMESYNCACC_1588PTP_PORT_MASTER, /**< PTP Communication Port in Master Mode */
100 IX_TIMESYNCACC_1588PTP_PORT_SLAVE, /**< PTP Communication Port in Slave Mode */
101 IX_TIMESYNCACC_1588PTP_PORT_ANYMODE, /**< PTP Communication Port in ANY Mode
102 allows time stamping of all messages
103 including non-1588 PTP */
104 IX_TIMESYNCACC_1588PTP_PORT_MODE_INVALID /**< Invalid PTP Port Mode */
105 }IxTimeSyncAcc1588PTPPortMode;
108 * @ingroup IxTimeSyncAcc
110 * @enum IxTimeSyncAcc1588PTPMsgType
112 * @brief 1588 PTP Messages types that can be detected on communication port
114 * Note that client code can determine this based on master/slave mode in which
115 * it is already operating in and this information is made available for the sake
116 * of convenience only.
118 typedef enum /**< IxTimeSyncAcc1588PTPMsgType */
120 IX_TIMESYNCACC_1588PTP_MSGTYPE_SYNC, /**< PTP Sync message sent by Master or received by Slave */
121 IX_TIMESYNCACC_1588PTP_MSGTYPE_DELAYREQ, /**< PTP Delay_Req message sent by Slave or received by Master */
122 IX_TIMESYNCACC_1588PTP_MSGTYPE_UNKNOWN /**< Other PTP and non-PTP message sent or received by both
123 Master and/or Slave */
124 } IxTimeSyncAcc1588PTPMsgType;
131 * @ingroup IxTimeSyncAcc
133 * @struct IxTimeSyncAccTimeValue
135 * @brief Struct to hold 64 bit SystemTime and TimeStamp values
137 typedef struct /**< IxTimeSyncAccTimeValue */
139 UINT32 timeValueLowWord; /**< Lower 32 bits of the time value */
140 UINT32 timeValueHighWord; /**< Upper 32 bits of the time value */
141 } IxTimeSyncAccTimeValue;
144 * @ingroup IxTimeSyncAcc
146 * @struct IxTimeSyncAccUuid
148 * @brief Struct to hold 48 bit UUID values captured in Sync or Delay_Req messages
150 typedef struct /**< IxTimeSyncAccUuid */
152 UINT32 uuidValueLowWord; /**<The lower 32 bits of the UUID */
153 UINT16 uuidValueHighHalfword; /**<The upper 16 bits of the UUID */
157 * @ingroup IxTimeSyncAcc
159 * @struct IxTimeSyncAccPtpMsgData
161 * @brief Struct for data from the PTP message returned when TimeStamp available
163 typedef struct /**< IxTimeSyncAccPtpMsgData */
165 IxTimeSyncAcc1588PTPMsgType ptpMsgType; /**< PTP Messages type */
166 IxTimeSyncAccTimeValue ptpTimeStamp; /**< 64 bit TimeStamp value from PTP Message */
167 IxTimeSyncAccUuid ptpUuid; /**< 48 bit UUID value from the PTP Message */
168 UINT16 ptpSequenceNumber; /**< 16 bit Sequence Number from PTP Message */
169 } IxTimeSyncAccPtpMsgData;
172 * @ingroup IxTimeSyncAcc
174 * @struct IxTimeSyncAccStats
176 * @brief Statistics for the PTP messages
178 typedef struct /**< IxTimeSyncAccStats */
180 UINT32 rxMsgs; /**< Count of timestamps for received PTP Messages */
181 UINT32 txMsgs; /**< Count of timestamps for transmitted PTP Messages */
182 } IxTimeSyncAccStats;
185 * @ingroup IxTimeSyncAcc
187 * @typedef IxTimeSyncAccTargetTimeCallback
189 * @brief Callback for use by target time stamp interrupt
191 typedef void (*IxTimeSyncAccTargetTimeCallback)(IxTimeSyncAccTimeValue targetTime);
194 * @ingroup IxTimeSyncAcc
196 * @typedef IxTimeSyncAccAuxTimeCallback
198 * @brief Callback for use by auxiliary time interrupts
200 typedef void (*IxTimeSyncAccAuxTimeCallback)(IxTimeSyncAccAuxMode auxMode,
201 IxTimeSyncAccTimeValue auxTime);
204 * Section for prototypes interface functions
208 * @ingroup IxTimeSyncAcc
210 * @fn IxTimeSyncAccStatus ixTimeSyncAccPTPPortConfigSet(
211 IxTimeSyncAcc1588PTPPort ptpPort,
212 IxTimeSyncAcc1588PTPPortMode ptpPortMode)
214 * @brief Configures the IEEE 1588 message detect on particular PTP port.
216 * @param ptpPort [in] - PTP port to config
217 * @param ptpPortMode [in]- Port to operate in Master or Slave mode
219 * This API will enable the time stamping on a particular PTP port.
221 * @li Re-entrant : No
222 * @li ISR Callable : No
224 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
225 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
226 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
228 PUBLIC IxTimeSyncAccStatus
229 ixTimeSyncAccPTPPortConfigSet(IxTimeSyncAcc1588PTPPort ptpPort,
230 IxTimeSyncAcc1588PTPPortMode ptpPortMode);
233 * @ingroup IxTimeSyncAcc
235 * @fn IxTimeSyncAccStatus ixTimeSyncAccPTPPortConfigGet(
236 IxTimeSyncAcc1588PTPPort ptpPort,
237 IxTimeSyncAcc1588PTPPortMode *ptpPortMode)
239 * @brief Retrieves IEEE 1588 PTP operation mode on particular PTP port.
241 * @param ptpPort [in] - PTP port
242 * @param ptpPortMode [in]- Mode of operation of PTP port (Master or Slave)
244 * This API will identify the time stamping capability of a PTP port by means
245 * of obtaining its mode of operation.
247 * @li Re-entrant : No
248 * @li ISR Callable : No
250 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
251 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
252 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
254 PUBLIC IxTimeSyncAccStatus
255 ixTimeSyncAccPTPPortConfigGet(IxTimeSyncAcc1588PTPPort ptpPort,
256 IxTimeSyncAcc1588PTPPortMode *ptpPortMode);
259 * @ingroup IxTimeSyncAcc
261 * @fn IxTimeSyncAccStatus ixTimeSyncAccPTPRxPoll(
262 IxTimeSyncAcc1588PTPPort ptpPort,
263 IxTimeSyncAccPtpMsgData *ptpMsgData)
265 * @brief Polls the IEEE 1588 message/time stamp detect status on a particular
266 * PTP Port on the Receive side.
268 * @param ptpPort [in] - PTP port to poll
269 * @param ptpMsgData [out] - Current TimeStamp and other Data
271 * This API will poll for the availability of a time stamp on the received Sync
272 * (Slave) or Delay_Req (Master) messages.
273 * The client application will provide the buffer.
275 * @li Re-entrant : No
276 * @li ISR Callable : No
278 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
279 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
280 * @li IX_TIMESYNCACC_NOTIMESTAMP - No time stamp available
281 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
283 PUBLIC IxTimeSyncAccStatus
284 ixTimeSyncAccPTPRxPoll(IxTimeSyncAcc1588PTPPort ptpPort,
285 IxTimeSyncAccPtpMsgData *ptpMsgData);
288 * @ingroup IxTimeSyncAcc
290 * @fn IxTimeSyncAccStatus ixTimeSyncAccPTPTxPoll(
291 IxTimeSyncAcc1588PTPPort ptpPort,
292 IxTimeSyncAccPtpMsgData *ptpMsgData)
295 * @brief Polls the IEEE 1588 message/time stamp detect status on a particular
296 * PTP Port on the Transmit side.
298 * @param ptpPort [in] - PTP port to poll
299 * @param ptpMsgData [out] - Current TimeStamp and other Data
301 * This API will poll for the availability of a time stamp on the transmitted
302 * Sync (Master) or Delay_Req (Slave) messages.
303 * The client application will provide the buffer.
305 * @li Re-entrant : No
306 * @li ISR Callable : No
308 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
309 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
310 * @li IX_TIMESYNCACC_NOTIMESTAMP - No time stamp available
311 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
313 PUBLIC IxTimeSyncAccStatus
314 ixTimeSyncAccPTPTxPoll(IxTimeSyncAcc1588PTPPort ptpPort,
315 IxTimeSyncAccPtpMsgData *ptpMsgData);
318 * @ingroup IxTimeSyncAcc
320 * @fn IxTimeSyncAccStatus ixTimeSyncAccSystemTimeSet(
321 IxTimeSyncAccTimeValue systemTime)
323 * @brief Sets the System Time in the IEEE 1588 hardware assist block
325 * @param systemTime [in] - Value to set System Time
327 * This API will set the SystemTime to given value.
329 * @li Re-entrant : yes
330 * @li ISR Callable : no
332 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
333 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
335 PUBLIC IxTimeSyncAccStatus
336 ixTimeSyncAccSystemTimeSet(IxTimeSyncAccTimeValue systemTime);
339 * @ingroup IxTimeSyncAcc
341 * @fn IxTimeSyncAccStatus ixTimeSyncAccSystemTimeGet(
342 IxTimeSyncAccTimeValue *systemTime)
344 * @brief Gets the System Time from the IEEE 1588 hardware assist block
346 * @param systemTime [out] - Copy the current System Time into the client
347 * application provided buffer
349 * This API will get the SystemTime from IEEE1588 block and return to client
351 * @li Re-entrant : no
352 * @li ISR Callable : no
354 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
355 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
356 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
358 PUBLIC IxTimeSyncAccStatus
359 ixTimeSyncAccSystemTimeGet(IxTimeSyncAccTimeValue *systemTime);
362 * @ingroup IxTimeSyncAcc
364 * @fn IxTimeSyncAccStatus ixTimeSyncAccTickRateSet(
367 * @brief Sets the Tick Rate (Frequency Scaling Value) in the IEEE 1588
368 * hardware assist block
370 * @param tickRate [in] - Value to set Tick Rate
372 * This API will set the Tick Rate (Frequency Scaling Value) in the IEEE
373 * 1588 block to the given value. The Accumulator register (not client
374 * visible) is incremented by this TickRate value every clock cycle. When
375 * the Accumulator overflows, the SystemTime is incremented by one. This
376 * TickValue can therefore be used to adjust the system timer.
378 * @li Re-entrant : yes
379 * @li ISR Callable : no
381 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
382 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
384 PUBLIC IxTimeSyncAccStatus
385 ixTimeSyncAccTickRateSet(UINT32 tickRate);
388 * @ingroup IxTimeSyncAcc
390 * @fn IxTimeSyncAccStatus ixTimeSyncAccTickRateGet(
393 * @brief Gets the Tick Rate (Frequency Scaling Value) from the IEEE 1588
394 * hardware assist block
396 * @param tickRate [out] - Current Tick Rate value in the IEEE 1588 block
398 * This API will get the TickRate on IEE15588 block. Refer to @ref
399 * ixTimeSyncAccTickRateSet for notes on usage of this value.
401 * @li Reentrant : yes
402 * @li ISR Callable : no
404 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
405 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
406 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
408 PUBLIC IxTimeSyncAccStatus
409 ixTimeSyncAccTickRateGet(UINT32 *tickRate);
412 * @ingroup IxTimeSyncAcc
414 * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeInterruptEnable(
415 IxTimeSyncAccTargetTimeCallback targetTimeCallback)
417 * @brief Enables the interrupt to verify the condition where the System Time
418 * greater or equal to the Target Time in the IEEE 1588 hardware assist block.
419 * If the condition is true an interrupt will be sent to XScale.
421 * @param targetTimeCallback [in] - Callback to be invoked when interrupt fires
423 * This API will enable the Target Time reached/hit condition interrupt.
425 * NOTE: The client application needs to ensure that the APIs
426 * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and
427 * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive
428 * manner with respect to each other.
430 * @li Re-entrant : no
431 * @li ISR Callable : yes
433 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
434 * @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for callback
435 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
437 PUBLIC IxTimeSyncAccStatus
438 ixTimeSyncAccTargetTimeInterruptEnable(IxTimeSyncAccTargetTimeCallback targetTimeCallback);
441 * @ingroup IxTimeSyncAcc
443 * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeInterruptDisable(
446 * @brief Disables the interrupt for the condition explained in the function
447 * description of @ref ixTimeSyncAccTargetTimeInterruptEnable.
449 * This API will disable the Target Time interrupt.
451 * NOTE: The client application needs to ensure that the APIs
452 * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and
453 * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive
454 * manner with respect to each other.
456 * @li Re-entrant : no
457 * @li ISR Callable : yes
459 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
460 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
462 PUBLIC IxTimeSyncAccStatus
463 ixTimeSyncAccTargetTimeInterruptDisable(void);
466 * @ingroup IxTimeSyncAcc
468 * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimePoll(
470 IxTimeSyncAccTimeValue *targetTime)
472 * @brief Poll to verify the condition where the System Time greater or equal to
473 * the Target Time in the IEEE 1588 hardware assist block. If the condition is
474 * true an event flag is set in the hardware.
476 * @param ttmPollFlag [out] - true if the target time reached/hit condition event set
477 * false if the target time reached/hit condition event is
479 * @param targetTime [out] - Capture current targetTime into client provided buffer
481 * Poll the target time reached/hit condition status. Return true and the current
482 * target time value, if the condition is true else return false.
484 * NOTE: The client application will need to clear the event flag that will be set
485 * as long as the condition that the System Time greater or equal to the Target Time is
486 * valid, in one of the following ways:
487 * 1) Invoke the API to change the target time
488 * 2) Change the system timer value
490 * @li Re-entrant : yes
491 * @li ISR Callable : no
493 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
494 * @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed
495 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
496 * @li IX_TIMESYNCACC_INTERRUPTMODEINUSE - Interrupt mode in use
498 PUBLIC IxTimeSyncAccStatus
499 ixTimeSyncAccTargetTimePoll(BOOL *ttmPollFlag,
500 IxTimeSyncAccTimeValue *targetTime);
503 * @ingroup IxTimeSyncAcc
505 * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeSet(
506 IxTimeSyncAccTimeValue targetTime)
508 * @brief Sets the Target Time in the IEEE 1588 hardware assist block
510 * @param targetTime [in] - Value to set Target Time
512 * This API will set the Target Time to a given value.
514 * NOTE: The client application needs to ensure that the APIs
515 * @ref ixTimeSyncAccTargetTimeInterruptEnable, @ref ixTimeSyncAccTargetTimeSet and
516 * @ref ixTimeSyncAccTargetTimeInterruptDisable are accessed in mutual exclusive
517 * manner with respect to each other.
520 * @li ISR Callable : yes
522 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
523 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
525 PUBLIC IxTimeSyncAccStatus
526 ixTimeSyncAccTargetTimeSet(IxTimeSyncAccTimeValue targetTime);
529 * @ingroup IxTimeSyncAcc
531 * @fn IxTimeSyncAccStatus ixTimeSyncAccTargetTimeGet(
532 IxTimeSyncAccTimeValue *targetTime)
534 * @brief Gets the Target Time in the IEEE 1588 hardware assist block
536 * @param targetTime [out] - Copy current time to client provided buffer
538 * This API will get the Target Time from IEEE 1588 block and return to the
541 * @li Re-entrant : yes
542 * @li ISR Callable : no
544 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
545 * @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed
546 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
548 PUBLIC IxTimeSyncAccStatus
549 ixTimeSyncAccTargetTimeGet(IxTimeSyncAccTimeValue *targetTime);
552 * @ingroup IxTimeSyncAcc
554 * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimeInterruptEnable(
555 IxTimeSyncAccAuxMode auxMode,
556 IxTimeSyncAccAuxTimeCallback auxTimeCallback)
558 * @brief Enables the interrupt notification for the given mode of Auxiliary Time
559 * Stamp in the IEEE 1588 hardware assist block
561 * @param auxMode [in] - Auxiliary time stamp register (slave or master) to use
562 * @param auxTimeCallback [in] - Callback to be invoked when interrupt fires
564 * This API will enable the Auxiliary Master/Slave Time stamp Interrupt.
567 * NOTE: 1) An individual callback is to be registered for each Slave and Master
568 * Auxiliary Time Stamp registers. Thus to register for both Master and Slave time
569 * stamp interrupts either the same callback or two separate callbacks the API has
570 * to be invoked twice.
571 * 2) On the IXDP465 Development Platform, the Auxiliary Timestamp signal for
572 * slave mode is tied to GPIO 8 pin. This signal is software routed by default to
573 * PCI for backwards compatibility with the IXDP425 Development Platform. This
574 * routing must be disabled for the auxiliary slave time stamp register to work
575 * properly. The following commands may be used to accomplish this. However, refer
576 * to the IXDP465 Development Platform Users Guide or the BSP/LSP documentation for
577 * more specific information.
579 * For Linux (at the Redboot prompt i.e., before loading zImage):
580 * mfill -b 0x54100000 -1 -l 1 -p 8
581 * mfill -b 0x54100001 -1 -l 1 -p 0x7f
582 * For vxWorks, at the prompt:
584 * ixdp400FpgaIODetach(8)
587 * @li Re-entrant : no
588 * @li ISR Callable : no
590 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
591 * @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for callback or
592 invalid auxiliary snapshot mode
593 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
595 PUBLIC IxTimeSyncAccStatus
596 ixTimeSyncAccAuxTimeInterruptEnable(IxTimeSyncAccAuxMode auxMode,
597 IxTimeSyncAccAuxTimeCallback auxTimeCallback);
600 * @ingroup IxTimeSyncAcc
602 * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimeInterruptDisable(
603 IxTimeSyncAccAuxMode auxMode)
605 * @brief Disables the interrupt for the indicated mode of Auxiliary Time Stamp
606 * in the IEEE 1588 hardware assist block
608 * @param auxMode [in] - Auxiliary time stamp mode (slave or master) using which
609 * the interrupt will be disabled.
611 * This API will disable the Auxiliary Time Stamp Interrupt (Master or Slave)
613 * @li Re-entrant : yes
614 * @li ISR Callable : no
616 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
617 * @li IX_TIMESYNCACC_INVALIDPARAM - Invalid parameters passed
618 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
620 PUBLIC IxTimeSyncAccStatus
621 ixTimeSyncAccAuxTimeInterruptDisable(IxTimeSyncAccAuxMode auxMode);
624 * @ingroup IxTimeSyncAcc
626 * @fn IxTimeSyncAccStatus ixTimeSyncAccAuxTimePoll(
627 IxTimeSyncAccAuxMode auxMode,
629 IxTimeSyncAccTimeValue *auxTime)
631 * @brief Poll for the Auxiliary Time Stamp captured for the mode indicated
634 * @param auxMode [in] - Auxiliary Snapshot Register (Slave or Master) to be checked
635 * @param auxPollFlag [out] - true if the time stamp captured in auxiliary
637 * false if the time stamp not captured in
638 auxiliary snapshot register
639 * @param auxTime [out] - Copy the current Auxiliary Snapshot Register value into the
640 * client provided buffer
642 * Polls for the Time stamp in the appropriate Auxiliary Snapshot Registers based
643 * on the mode specified. Return true and the contents of the Auxiliary snapshot,
644 * if it is available else return false.
646 * Please refer to the note #2 of the API @ref ixTimeSyncAccAuxTimeInterruptEnable
647 * for more information for Auxiliary Slave mode.
649 * @li Re-entrant : yes
650 * @li ISR Callable : no
652 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
653 * @li IX_TIMESYNCACC_INVALIDPARAM - Null parameter passed for auxPollFlag,
654 callback or invalid auxiliary snapshot mode
655 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
656 * @li IX_TIMESYNCACC_INTERRUPTMODEINUSE - Interrupt mode in use
658 PUBLIC IxTimeSyncAccStatus
659 ixTimeSyncAccAuxTimePoll(IxTimeSyncAccAuxMode auxMode,
661 IxTimeSyncAccTimeValue *auxTime);
664 * @ingroup IxTimeSyncAcc
666 * @fn IxTimeSyncAccStatus ixTimeSyncAccReset(void)
668 * @brief Resets the IEEE 1588 hardware assist block
670 * Sets the reset bit in the IEEE1588 silicon which fully resets the silicon block
672 * @li Reentrant : yes
673 * @li ISR Callable : no
675 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
676 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
678 PUBLIC IxTimeSyncAccStatus
679 ixTimeSyncAccReset(void);
682 * @ingroup IxTimeSyncAcc
684 * @fn IxTimeSyncAccStatus ixTimeSyncAccStatsGet(IxTimeSyncAccStats
687 * @brief Returns the IxTimeSyncAcc Statistics in the client supplied buffer
689 * @param timeSyncStats [out] - TimeSync statistics counter values
691 * This API will return the statistics of the received or transmitted messages.
693 * NOTE: 1) These counters are updated only when the client polls for the time
694 * stamps or interrupt are enabled. This is because the IxTimeSyncAcc module
695 * does not either transmit or receive messages and does only run the code
696 * when explicit requests received by client application.
698 * 2) These statistics reflect the number of valid PTP messages exchanged
699 * in Master and Slave modes but includes all the messages (including valid
700 * non-PTP messages) while operating in the Any mode.
703 * @li ISR Callable : no
705 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
706 * @li IX_TIMESYNCACC_INVALIDPARAM - NULL parameter passed
707 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
709 PUBLIC IxTimeSyncAccStatus
710 ixTimeSyncAccStatsGet(IxTimeSyncAccStats *timeSyncStats);
713 * @ingroup IxTimeSyncAcc
715 * @fn void ixTimeSyncAccStatsReset(void)
717 * @brief Reset Time Sync statistics
719 * This API will reset the statistics counters of the TimeSync access layer.
721 * @li Reentrant : yes
722 * @li ISR Callable: no
727 ixTimeSyncAccStatsReset(void);
730 * @ingroup IxTimeSyncAcc
732 * @fn IxTimeSyncAccStatus ixTimeSyncAccShow(void)
734 * @brief Displays the Time Sync current status
736 * This API will display status on the current configuration of the IEEE
737 * 1588 hardware assist block, contents of the various time stamp registers,
738 * outstanding interrupts and/or events.
740 * Note that this is intended for debug only, and in contrast to the other
741 * functions, it does not clear the any of the status bits associated with
742 * active timestamps and so is passive in its nature.
744 * @li Reentrant : yes
745 * @li ISR Callable : no
747 * @return @li IX_TIMESYNCACC_SUCCESS - Operation is successful
748 * @li IX_TIMESYNCACC_FAILED - Internal error occurred
750 PUBLIC IxTimeSyncAccStatus
751 ixTimeSyncAccShow(void);
753 #endif /* __ixp46X */
754 #endif /* IXTIMESYNCACC_H */
757 * @} defgroup IxTimeSyncAcc