![]() |
Synergy Software Package User's Manual
|
Driver for the Precision time protocol(PTP). More...
Data Structures | |
| struct | ptp_instance_ctrl_t |
Functions | |
| ssp_err_t | R_PTP_Open (ptp_ctrl_t *const p_api_ctrl, ptp_cfg_t const *const p_cfg) |
| Open the PTP driver, handles required initialization described in hardware manual. Implements ptp_api_t::open. More... | |
| ssp_err_t | R_PTP_Close (ptp_ctrl_t *const p_api_ctrl) |
| Closes the PTP driver. Implements ptp_api_t::close. More... | |
| ssp_err_t | R_PTP_Configure (ptp_ctrl_t *const p_api_ctrl, uint32_t *p_ip_address, uint32_t *p_physical_address_msw, uint32_t *p_physical_address_lsw) |
| Configures the PTP driver with IP and MAC address. Implements ptp_api_t::configure. More... | |
| ssp_err_t | R_PTP_SetExtPromiscuous (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, bool is_set) |
| Sets or clear the extended promiscuous mode of the specified PTP channel. Implements ptp_api_t::setExtPromiscuous. More... | |
| ssp_err_t | R_PTP_GetLocalClock (ptp_ctrl_t *const p_api_ctrl, ptp_timestamp_t *p_clock, uint32_t wait_option) |
| Gets the current local clock counter value in Timestamp format(UNIX time) when configured as slave. Implements ptp_api_t::getLocalClock. More... | |
| ssp_err_t | R_PTP_SetLocalClock (ptp_ctrl_t *const p_api_ctrl, ptp_timestamp_t *p_clock) |
| Sets local clock counter value with Timestamp (UNIX time). Master clock set the master time. Implements ptp_api_t::setLocalClock. More... | |
| ssp_err_t | R_PTP_GetMasterPortID (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
| Gets master clock ID and master port number fields of the specified PTP channel. Note: If the argument (p_clock or p_port) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getMasterPortID. More... | |
| ssp_err_t | R_PTP_SetMasterPortID (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, uint32_t *p_clock, uint16_t *p_port) |
| Sets master clock ID and master port number fields of the specified PTP channel. Note: If the argument (p_clock or p_port) is NULL pointer, the value will not be updated. Implements ptp_api_t::setMasterPortID. More... | |
| ssp_err_t | R_PTP_GetSyncInfo (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, ptp_timeInterval_t *p_master_offset, ptp_timeInterval_t *p_path_delay) |
| Gets the current offset from master and mean path delay of the specified PTP channel when configured as slave. Note: If the argument (p_master_offset or p_path_delay) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getSyncInfo. More... | |
| ssp_err_t | R_PTP_Start (ptp_ctrl_t *const p_api_ctrl, uint32_t wait_option) |
| Starts time synchronization. Implements ptp_api_t::start. More... | |
| ssp_err_t | R_PTP_Stop (ptp_ctrl_t *const p_api_ctrl, uint32_t wait_option) |
| Stops time synchronization. Implements ptp_api_t::stop. More... | |
| ssp_err_t | R_PTP_SetWorst10Values (ptp_ctrl_t *const p_api_ctrl, uint8_t interval) |
| Sets the interval for collecting worst 10 values. Implements ptp_api_t::setWorst10Values. More... | |
| ssp_err_t | R_PTP_CheckWorst10Values (ptp_ctrl_t *const p_api_ctrl, uint32_t wait_option) |
| Checks if worst 10 values are acquired and set as gradient limits when configured as slave. Implements ptp_api_t::checkWorst10Values. More... | |
| ssp_err_t | R_PTP_GetWorst10Values (ptp_ctrl_t *const p_api_ctrl, uint32_t *p_positive_worst10, uint32_t *p_negative_worst10, uint32_t wait_option) |
| Gets positive and negative worst 10 values by software. Note: If the argument (p_positive_worst10 or p_negative_worst10) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getWorst10Values. More... | |
| ssp_err_t | R_PTP_SetGradientLimit (ptp_ctrl_t *const p_api_ctrl, uint32_t *p_positive_limit, uint32_t *p_negative_limit) |
| Sets the gradient limits for positive and negative worst 10 values. Note: If the argument (p_positive_limit or p_negative_limit) is NULL pointer, the value will not be acquired. Implements ptp_api_t::setGradientLimit. More... | |
| ssp_err_t | R_PTP_UpdateClockID (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, int8_t *p_clock_id) |
| Updates clock identity field. Implements ptp_api_t::updateClockID. More... | |
| ssp_err_t | R_PTP_UpdateDomainNumber (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, uint8_t domain_num) |
| Updates domain number field in the message header. Implements ptp_api_t::updateDomainNumber. More... | |
| ssp_err_t | R_PTP_UpdateAnnounceFlags (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, ptp_announce_flag_t *p_flag) |
| Updates announce message's flag field. Implements ptp_api_t::updateAnnounceFlags. More... | |
| ssp_err_t | R_PTP_UpdateAnnounceMsgs (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, ptp_announce_message_t *p_message) |
| Updates announce message's message field. Implements ptp_api_t::updateAnnounceMsgs. More... | |
| ssp_err_t | R_PTP_UpdateSyncAnnounceMsgInterval (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, int8_t *p_sync_interval, int8_t *p_announce_interval) |
| Updates transmission interval and logMessageInterval of Sync and Announce messages. Note: If the argument (p_sync_interval or p_announce_interval) is NULL pointer, the value will not be acquired. Implements ptp_api_t::updateSyncAnnounceMsgInterval. More... | |
| ssp_err_t | R_PTP_UpdateDelayMsgInterval (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, int8_t *p_interval, uint32_t *p_timeout) |
| Updates transmission interval, logMessageInterval and timeout values of Delay message. Note: If the argument (p_interval or p_timeout) is NULL pointer, the value will not be updated. Implements ptp_api_t::updateDelayMsgInterval. More... | |
| ssp_err_t | R_PTP_GetMessageReceptionConfig (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
| Gets PTP message reception synchronous configuration. Implements ptp_api_t::getMessageReceptionConfig. More... | |
| ssp_err_t | R_PTP_SetMessageReceptionConfig (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, ptp_message_reception_t *p_ptp_message_reception) |
| Sets PTP message reception synchronous configuration. Implements ptp_api_t::setMessageReceptionConfig. More... | |
| ssp_err_t | R_PTP_DisableTimer (ptp_ctrl_t *const p_api_ctrl, ptp_stca_timer_channel_t timer_channel) |
| Disables the specified timer event interrupt. Implements ptp_api_t::disableTimer. More... | |
| ssp_err_t | R_PTP_IndicateEvent (ptp_ctrl_t *const p_api_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
| Set/clear interrupt indication to ELC output on generation of pulse produced by pulse output timer. Implements ptp_api_t::indicateEvent. More... | |
| ssp_err_t | R_PTP_AutoClearEvent (ptp_ctrl_t *const p_api_ctrl, ptp_stca_timer_channel_t timer_channel, ptp_stca_timer_pulse_edge_t timer_pulse_edge, bool is_set) |
| Set/clear auto clear mode for enabling one time output of ELC event. Implements ptp_api_t::autoClearEvent. More... | |
| ssp_err_t | R_PTP_SetTimer (ptp_ctrl_t *const p_api_ctrl, uint8_t timer_channel, UInt64_t event_time, uint32_t cycle, uint32_t pulse_width) |
| Sets start time, pulse period and pulse width for the pulse output timer. Implements ptp_api_t::setTimer. More... | |
| ssp_err_t | R_PTP_SetMINTevent (ptp_ctrl_t *const p_api_ctrl, ptp_event_t ptp_reg, uint32_t event, bool is_set) |
| Sets MINT interrupt event to enable notification for change in state of modules Implements ptp_api_t::setMINTevent. More... | |
| ssp_err_t | R_PTP_EnableINFABTnotification (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel) |
| Enables EPTPC INFABT notification of the specified PTP channel. Implements ptp_api_t::enableINFABTnotification. More... | |
| ssp_err_t | R_PTP_DisableINFABTnotification (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel) |
| Disables EPTPC INFABT notification of the specified PTP channel. Implements ptp_api_t::disableINFABTnotification. More... | |
| ssp_err_t | R_PTP_CheckINFABTstatus (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel, uint8_t *p_status) |
| Checks the status of INFABT flag of the specified PTP channel. Implements ptp_api_t::checkINFABTstatus. More... | |
| ssp_err_t | R_PTP_ClearINFABTstatus (ptp_ctrl_t *const p_api_ctrl, uint8_t ptp_channel) |
| Clears INFABT interrupt occurrence flag of the specified PTP channel. Implements ptp_api_t::clearINFABTstatus. More... | |
| ssp_err_t | R_PTP_VersionGet (ssp_version_t *const p_version) |
| Gets version information and stores it in the provided version struct. Implements ptp_api_t::versionGet. More... | |
Driver for the Precision time protocol(PTP).
This module supports the PTP time synchronization functionality.
Extends PTP driver Interface.
| ssp_err_t R_PTP_AutoClearEvent | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_stca_timer_channel_t | timer_channel, | ||
| ptp_stca_timer_pulse_edge_t | timer_pulse_edge, | ||
| bool | is_set | ||
| ) |
Set/clear auto clear mode for enabling one time output of ELC event. Implements ptp_api_t::autoClearEvent.
| SSP_SUCCESS | ELC interrupt auto clear mode set or clear is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Get IPLS Interrupt Permission Automatic clearing register status
If set, enable automatic clearing for specified pulse output timer channel
Set IPLS Interrupt Permission Automatic clearing register status
| ssp_err_t R_PTP_CheckINFABTstatus | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| uint8_t * | p_status | ||
| ) |
Checks the status of INFABT flag of the specified PTP channel. Implements ptp_api_t::checkINFABTstatus.
| SSP_SUCCESS | INFABT flag status check is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Gets the current status of INFABT notification flag of the specified PTP channel
| ssp_err_t R_PTP_CheckWorst10Values | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t | wait_option | ||
| ) |
Checks if worst 10 values are acquired and set as gradient limits when configured as slave. Implements ptp_api_t::checkWorst10Values.
| SSP_SUCCESS | Gradient values are set based on worst 10 values successfully. |
| SSP_ERR_TIMEOUT | Gradient values are not set before timeout. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Wait till worst10 values are acquired by hardware and set as gradient limits
| ssp_err_t R_PTP_ClearINFABTstatus | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel | ||
| ) |
Clears INFABT interrupt occurrence flag of the specified PTP channel. Implements ptp_api_t::clearINFABTstatus.
| SSP_SUCCESS | INFABT status flag clear is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Clear the status of INFABT notification flag of the specified PTP channel
| ssp_err_t R_PTP_Close | ( | ptp_ctrl_t *const | p_api_ctrl | ) |
Closes the PTP driver. Implements ptp_api_t::close.
| SSP_SUCCESS | The PTP driver is successfully closed. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Disable PTP MINT interrupt
Release hardware lock
Mark driver as closed
| ssp_err_t R_PTP_Configure | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t * | p_ip_address, | ||
| uint32_t * | p_physical_address_msw, | ||
| uint32_t * | p_physical_address_lsw | ||
| ) |
Configures the PTP driver with IP and MAC address. Implements ptp_api_t::configure.
| SSP_SUCCESS | The PTP driver is successfully configured with IP and MAC address. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block or passed argument is NULL. |
Initialize Synchronization Frame Processing unit (SYNFP)
Initialize Packet Relation Controller (PRC-TC) and Statistical Time Correction Algorithm (STCA) units
| ssp_err_t R_PTP_DisableINFABTnotification | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel | ||
| ) |
Disables EPTPC INFABT notification of the specified PTP channel. Implements ptp_api_t::disableINFABTnotification.
| SSP_SUCCESS | INFABT notification disable is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Disable INFABT detection flag of the specified PTP channel
| ssp_err_t R_PTP_DisableTimer | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_stca_timer_channel_t | timer_channel | ||
| ) |
Disables the specified timer event interrupt. Implements ptp_api_t::disableTimer.
| SSP_SUCCESS | Timer event interrupt disable is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Get MINT interrupt request status
Disable the timer event of specified pulse output channel
| ssp_err_t R_PTP_EnableINFABTnotification | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel | ||
| ) |
Enables EPTPC INFABT notification of the specified PTP channel. Implements ptp_api_t::enableINFABTnotification.
| SSP_SUCCESS | INFABT notification enable is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Initially clear the status of INFABT detection flag of the specified PTP channel
Enable generation of ETHER_MINT interrupt by SYNFP0 status flag
Enable generation of ETHER_MINT interrupt by SYNFP1 status flag
Enable the INFABT detection flag of specified PTP channel
| ssp_err_t R_PTP_GetLocalClock | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_timestamp_t * | p_clock, | ||
| uint32_t | wait_option | ||
| ) |
Gets the current local clock counter value in Timestamp format(UNIX time) when configured as slave. Implements ptp_api_t::getLocalClock.
| SSP_SUCCESS | Local clock counter get is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_TIMEOUT | Clock info is not acquired before timeout. |
| SSP_ERR_ASSERTION | Pointer to the control block or p_clock parameter is NULL. |
Request the current local clock counter information
Wait till local clock counter value is loaded with current local time
Save current local clock counter value
| ssp_err_t R_PTP_GetMasterPortID | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| uint32_t * | p_clock, | ||
| uint16_t * | p_port | ||
| ) |
Gets master clock ID and master port number fields of the specified PTP channel. Note: If the argument (p_clock or p_port) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getMasterPortID.
| SSP_SUCCESS | Master port ID get is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block, p_clock or p_port parameter is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Get master clock ID high and low fields
Get master port number field
| ssp_err_t R_PTP_GetMessageReceptionConfig | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| ptp_message_reception_t * | p_ptp_message_reception | ||
| ) |
Gets PTP message reception synchronous configuration. Implements ptp_api_t::getMessageReceptionConfig.
| SSP_SUCCESS | Synchronous configuration get is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Get SYNFP Reception Filter Register 1
Get SYNFP Reception Filter Register 2
Get SYNFP Transmission Enable Register
Get SYNFP Operation Setting Register
| ssp_err_t R_PTP_GetSyncInfo | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| ptp_timeInterval_t * | p_master_offset, | ||
| ptp_timeInterval_t * | p_path_delay | ||
| ) |
Gets the current offset from master and mean path delay of the specified PTP channel when configured as slave. Note: If the argument (p_master_offset or p_path_delay) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getSyncInfo.
| SSP_SUCCESS | Offset from master and mean path delay get is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block, p_master_offset or p_path_delay is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Request offset from master from the specified PTP channel
Get the offset from master in nano-seconds format
Request mean path delay from the specified PTP channel
Get the mean path delay in nano-seconds format
| ssp_err_t R_PTP_GetWorst10Values | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t * | p_positive_worst10, | ||
| uint32_t * | p_negative_worst10, | ||
| uint32_t | wait_option | ||
| ) |
Gets positive and negative worst 10 values by software. Note: If the argument (p_positive_worst10 or p_negative_worst10) is NULL pointer, the value will not be acquired. Implements ptp_api_t::getWorst10Values.
| SSP_SUCCESS | Positive and negative worst 10 values get is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Request current worst10 values acquired
Wait till gradient worst10 values are acquired by software
Get positive gradient values
Get negative gradient values
| ssp_err_t R_PTP_IndicateEvent | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_stca_timer_channel_t | timer_channel, | ||
| ptp_stca_timer_pulse_edge_t | timer_pulse_edge, | ||
| bool | is_set | ||
| ) |
Set/clear interrupt indication to ELC output on generation of pulse produced by pulse output timer. Implements ptp_api_t::indicateEvent.
| SSP_SUCCESS | ELC interrupt indication set or clear is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Get IPLS Interrupt Permission Register status
If set, enable output from pulse output timer channel
Set IPLS Interrupt Permission Register status
| ssp_err_t R_PTP_Open | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_cfg_t const *const | p_cfg | ||
| ) |
Open the PTP driver, handles required initialization described in hardware manual. Implements ptp_api_t::open.
| SSP_SUCCESS | PTP driver has opened successfully and initialization was successful. |
| SSP_ERR_IN_USE | The channel specified has already been opened. |
| SSP_ERR_ASSERTION | The p_ctrl or p_cfg parameter was NULL. |
| SSP_ERR_IRQ_BSP_DISABLED | A required interrupt does not exist in the vector table. |
Verify if this unit has not already been initialized
Make sure the peripheral exists
Lock EPTPC channel
Power on the PTP module.
Configure MINT interrupt
Reset PTP driver
Wait at least 64 cycles of PCLKA to reset the PTPEDMAC and EPTPC. PCLKA must be at least 12.5 MHz to use Ethernet, so wait at least 5.12 us.
Initialize the channel state information
Select synchronization frame processing unit (SYNFP0 or SYNFP1)
Initialize EPTPC MINT interrupt requests
Initialize SYNFP reception status
Enable MINT interrupt
Disable bypassing of EPTPC module
Mark driver as opened by initializing it to "PTP" in its ASCII equivalent for this unit
| ssp_err_t R_PTP_SetExtPromiscuous | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| bool | is_set | ||
| ) |
Sets or clear the extended promiscuous mode of the specified PTP channel. Implements ptp_api_t::setExtPromiscuous.
| SSP_SUCCESS | Extended promiscuous mode is set/cleared successfully. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Set or clear extended promiscuous mode of the specified PTP channel
| ssp_err_t R_PTP_SetGradientLimit | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t * | p_positive_limit, | ||
| uint32_t * | p_negative_limit | ||
| ) |
Sets the gradient limits for positive and negative worst 10 values. Note: If the argument (p_positive_limit or p_negative_limit) is NULL pointer, the value will not be acquired. Implements ptp_api_t::setGradientLimit.
| SSP_SUCCESS | Positive and negative gradient values set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Set positive gradient values
Set negative gradient values
| ssp_err_t R_PTP_SetLocalClock | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_timestamp_t * | p_clock | ||
| ) |
Sets local clock counter value with Timestamp (UNIX time). Master clock set the master time. Implements ptp_api_t::setLocalClock.
| SSP_SUCCESS | Local clock counter set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block or p_clock parameter is NULL. |
Set local clock counter value with the specified time information
| ssp_err_t R_PTP_SetMasterPortID | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| uint32_t * | p_clock, | ||
| uint16_t * | p_port | ||
| ) |
Sets master clock ID and master port number fields of the specified PTP channel. Note: If the argument (p_clock or p_port) is NULL pointer, the value will not be updated. Implements ptp_api_t::setMasterPortID.
| SSP_SUCCESS | Master port ID is updated successfully. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block, p_clock or p_port is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Set master clock ID high and low fields
Set master port number field
| ssp_err_t R_PTP_SetMessageReceptionConfig | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| ptp_message_reception_t * | p_ptp_message_reception | ||
| ) |
Sets PTP message reception synchronous configuration. Implements ptp_api_t::setMessageReceptionConfig.
| SSP_SUCCESS | Synchronous configuration set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Set SYNFP Reception Filter Register 1
Set SYNFP Reception Filter Register 2
Set SYNFP Transmission Enable Register
Set SYNFP Operation Setting Register
| ssp_err_t R_PTP_SetMINTevent | ( | ptp_ctrl_t *const | p_api_ctrl, |
| ptp_event_t | ptp_reg, | ||
| uint32_t | event, | ||
| bool | is_set | ||
| ) |
Sets MINT interrupt event to enable notification for change in state of modules Implements ptp_api_t::setMINTevent.
| SSP_SUCCESS | MINT interrupt event set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Enable notification of STCA status
Enable notification of PRC-TC status
Enable notification of SYNFP0 status
Enable notification of SYNFP1 status
| ssp_err_t R_PTP_SetTimer | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | timer_channel, | ||
| UInt64_t | event_time, | ||
| uint32_t | cycle, | ||
| uint32_t | pulse_width | ||
| ) |
Sets start time, pulse period and pulse width for the pulse output timer. Implements ptp_api_t::setTimer.
| SSP_SUCCESS | Timer event set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Set event time, PWM cycle interval and PWM pulse width to specified timer channel
Start the specified pulse output timer
| ssp_err_t R_PTP_SetWorst10Values | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | interval | ||
| ) |
Sets the interval for collecting worst 10 values. Implements ptp_api_t::setWorst10Values.
| SSP_SUCCESS | Worst 10 values are recorded successfully. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
Sets interval to get worst 10 values
| ssp_err_t R_PTP_Start | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t | wait_option | ||
| ) |
Starts time synchronization. Implements ptp_api_t::start.
| SSP_SUCCESS | Time synchronization started successfully. |
| SSP_ERR_TIMEOUT | Time synchronization did not start before timeout. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_MODE | Invalid PTP mode. |
Starts time synchronization
| ssp_err_t R_PTP_Stop | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint32_t | wait_option | ||
| ) |
Stops time synchronization. Implements ptp_api_t::stop.
| SSP_SUCCESS | Time synchronization stopped successfully. |
| SSP_ERR_TIMEOUT | Time synchronization did not stop before timeout. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_MODE | Invalid PTP mode. |
Stops the time synchronization
| ssp_err_t R_PTP_UpdateAnnounceFlags | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| ptp_announce_flag_t * | p_flag | ||
| ) |
Updates announce message's flag field. Implements ptp_api_t::updateAnnounceFlags.
| SSP_SUCCESS | Announce message flag field set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Update announce message's flag field
| ssp_err_t R_PTP_UpdateAnnounceMsgs | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| ptp_announce_message_t * | p_message | ||
| ) |
Updates announce message's message field. Implements ptp_api_t::updateAnnounceMsgs.
| SSP_SUCCESS | Announce message field set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Update grandmasterPriority1 and grandmasterPriority2 fields
Update grandmasterClockQuality fields
Update grandmasterIdentity fields of Announce messages
| ssp_err_t R_PTP_UpdateClockID | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| int8_t * | p_clock_id | ||
| ) |
Updates clock identity field. Implements ptp_api_t::updateClockID.
| SSP_SUCCESS | Clock identity field set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Update local clockIdentity field of the specified EPTPC port
| ssp_err_t R_PTP_UpdateDelayMsgInterval | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| int8_t * | p_interval, | ||
| uint32_t * | p_timeout | ||
| ) |
Updates transmission interval, logMessageInterval and timeout values of Delay message. Note: If the argument (p_interval or p_timeout) is NULL pointer, the value will not be updated. Implements ptp_api_t::updateDelayMsgInterval.
| SSP_SUCCESS | Transmission interval, logMessage interval and timeout set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
If clock state is master, update Delay_Response logMessageInterval value
If clock state is slave, update Delay_Request /Pdelay_Request transmission interval value
Update Delay_Response/Pdelay_Response receiving timeout value
| ssp_err_t R_PTP_UpdateDomainNumber | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| uint8_t | domain_num | ||
| ) |
Updates domain number field in the message header. Implements ptp_api_t::updateDomainNumber.
| SSP_SUCCESS | Domain number field set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Update domainNumber field of the PTP message header
| ssp_err_t R_PTP_UpdateSyncAnnounceMsgInterval | ( | ptp_ctrl_t *const | p_api_ctrl, |
| uint8_t | ptp_channel, | ||
| int8_t * | p_sync_interval, | ||
| int8_t * | p_announce_interval | ||
| ) |
Updates transmission interval and logMessageInterval of Sync and Announce messages. Note: If the argument (p_sync_interval or p_announce_interval) is NULL pointer, the value will not be acquired. Implements ptp_api_t::updateSyncAnnounceMsgInterval.
| SSP_SUCCESS | Transmission interval and logMessage interval set is successful. |
| SSP_ERR_NOT_OPEN | The PTP driver is not opened. |
| SSP_ERR_ASSERTION | Pointer to the control block is NULL. |
| SSP_ERR_INVALID_CHANNEL | Invalid EPTPC channel. |
Update SYNFP Sync message transmission interval
Update SYNFP announce message Transmission Interval
| ssp_err_t R_PTP_VersionGet | ( | ssp_version_t *const | p_version | ) |
Gets version information and stores it in the provided version struct. Implements ptp_api_t::versionGet.
| SSP_SUCCESS | Version returned successfully. |
| SSP_ERR_ASSERTION | Parameter p_version was NULL. |
Return the version number