Jetson Linux API Reference

39.2 Release
NvCamFsync.h File Reference

Go to the source code of this file.

Typedefs

typedef enum CAM_FSYNC_STATUS CAM_FSYNC_STATUS
 Status codes for fsync group program start time operation. More...
 

Enumerations

enum  CAM_FSYNC_STATUS {
  CAM_FSYNC_OK = 0,
  CAM_FSYNC_GROUP_BUSY,
  CAM_FSYNC_GROUP_NOT_FOUND,
  CAM_FSYNC_GROUP_FAULT,
  CAM_FSYNC_ERROR,
  CAM_FSYNC_UNSUPPORTED,
  CAM_FSYNC_GROUP_IDLE,
  CAM_FSYNC_INVALID_CONFIG,
  CAM_FSYNC_GENERATOR_NOT_FOUND
}
 Status codes for fsync group program start time operation. More...
 

Functions

CAM_FSYNC_STATUS cam_fsync_program_abs_start_value (uint32_t group_id, uint64_t start_time_in_tsc_ticks)
 Program and start generators in group with absolute start time in TSC ticks. More...
 
CAM_FSYNC_STATUS cam_fsync_stop_group (uint32_t group_id)
 Stop all generators in the requested group. More...
 
CAM_FSYNC_STATUS cam_fsync_reconfigure_generator (uint32_t group_id, uint32_t generator_id, uint32_t frequency_hz, uint32_t duty_cycle, uint32_t offset_ms)
 Reconfigure the period, duty cycle, and relative offset of a given generator. More...
 

Typedef Documentation

◆ CAM_FSYNC_STATUS

Status codes for fsync group program start time operation.

Enumeration Type Documentation

◆ CAM_FSYNC_STATUS

Status codes for fsync group program start time operation.

Enumerator
CAM_FSYNC_OK 

The operation was successful.

CAM_FSYNC_GROUP_BUSY 

Group is busy.

Generator in group already running.

CAM_FSYNC_GROUP_NOT_FOUND 

Group not found for specified group id.

CAM_FSYNC_GROUP_FAULT 

The operation encountered fault.

Start time may be in past or failed to start the generator.

CAM_FSYNC_ERROR 

A generic error occured during the operation.

CAM_FSYNC_UNSUPPORTED 

The requested operation is not supported.

CAM_FSYNC_GROUP_IDLE 

Group is idle.

Generator in group is not running.

CAM_FSYNC_INVALID_CONFIG 

The generator configuration is invalid.

CAM_FSYNC_GENERATOR_NOT_FOUND 

Generator not found for specified generator id.

Definition at line 23 of file NvCamFsync.h.

Function Documentation

◆ cam_fsync_program_abs_start_value()

CAM_FSYNC_STATUS cam_fsync_program_abs_start_value ( uint32_t  group_id,
uint64_t  start_time_in_tsc_ticks 
)

Program and start generators in group with absolute start time in TSC ticks.

This function programs and start all the generator in group identified by group ID at an absolute start time given in TSC ticks.

Precondition
None
Parameters
[in]group_idGroup id for the node Valid range: [ MIN_GROUP_ID_DEFINED_IN_DT, MAX_GROUP_ID_DEFINED_IN_DT]
[in]start_time_in_tsc_ticksStart time in TSC ticks to program generators in group Valid range: [ TSC_CURRENT_TICKS, MAX_UINT64]
Return values
CAM_FSYNC_OKSuccess to program and start fsync in group_id with start_time_in_tsc_ticks
Errorstatus defined in CAM_FSYNC_STATUS.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: Yes, with the following conditions:
    • Grants: nonroot, allow
    • Abilities: public_channel, cam-fsync/group:<group id>
    • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: No
    • Maturity: GA

◆ cam_fsync_reconfigure_generator()

CAM_FSYNC_STATUS cam_fsync_reconfigure_generator ( uint32_t  group_id,
uint32_t  generator_id,
uint32_t  frequency_hz,
uint32_t  duty_cycle,
uint32_t  offset_ms 
)

Reconfigure the period, duty cycle, and relative offset of a given generator.

Precondition
The generator and its group must be in a stopped state.
Parameters
[in]group_idGroup id for the node Valid range: [MIN_GROUP_ID_DEFINED_IN_DT, MAX_GROUP_ID_DEFINED_IN_DT]
[in]generator_idID of the generator within the group. The ID of a generator is its index within the group (defined in DT). Valid range: [MIN_GENERATOR_ID_DEFINED_IN_DT, MAX_GENERATOR_ID_DEFINED_IN_DT]
[in]frequnecy_hzThe new frequency, in Hz. On Linux, all generators within the group must have a least-common-multiple frequency not greater than 120Hz. On QNX, all generators must not be greater than 120Hz and rational multiples of the highest frequency. Valid range: [> 0, 120]
[in]duty_cycleThe new duty cycle, in whole percent. Valid range: [> 0, < 100]
[in]offset_msThe new relative offset, in milliseconds. Value range: [non-zero]
Return values
CAM_FSYNC_OKThe requested generator was successfully reconfigured.
CAM_FSYNC_GROUP_BUSYThe group is not stopped - the generator cannot be reconfigured.
CAM_FSYNC_INVALID_CONFIGThe input frequency, duty cycle, or relative offset is out-of-range. The input frequency, duty cycle, or relative offset conflicts with other generators in the group.
CAM_FSYNC_GROUP_NOT_FOUNDThe input group ID was not found.
CAM_FSYNC_GENERATOR_NOT_FOUNDThe input generator ID was not found.
CAM_FSYNC_ERRORA generic error occurred.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: Yes, with the following conditions:
    • Grants: nonroot, allow
    • Abilities: public_channel, cam-fsync/group:<group id>
    • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: No
    • Maturity: GA

◆ cam_fsync_stop_group()

CAM_FSYNC_STATUS cam_fsync_stop_group ( uint32_t  group_id)

Stop all generators in the requested group.

Precondition
None
Parameters
[in]group_idGroup id for the node Valid range: [ MIN_GROUP_ID_DEFINED_IN_DT, MAX_GROUP_ID_DEFINED_IN_DT]
Return values
CAM_FSYNC_OKSuccessfully stopped all generators in the requested group.
CAM_FSYNC_GROUP_IDLEFailed to stop the generators - the group is already stopped.
CAM_FSYNC_GROUP_NOT_FOUNDThe input group ID was not found.
CAM_FSYNC_ERRORA generic error occurred.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: Yes, with the following conditions:
    • Grants: nonroot, allow
    • Abilities: public_channel, cam-fsync/group:<group id>
    • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: No
    • Maturity: GA