Camsys 时间戳信息简介

不同平台时间戳介绍

1.征程 3 平台

其中 u64 timestamps: 硬件时间戳,是跟 CPU 一起用的 64 bit system counter,1s 是 24M 个 clock。 FS 的时候从硬件寄存器读取。读取的值除以 24000 是毫秒,除以 24000000 是秒。

struct timeval tv; 系统时间, SIF FS 的时候获取 do_gettimeofday。

C 复制代码
J3 时间戳和frameid相关的结构体定义如下:
驱动接口:
struct frame_id {
    u32 frame_id;
    u64 timestamps;
    struct timeval tv;
};
HAL结构体:
typedef struct image_info_s {
    uint16_t sensor_id;
    uint32_t pipeline_id;
    uint32_t frame_id;
    uint64_t time_stamp;    //HW time stamp 硬件时间
    struct timeval tv;     //system time of hal get buf,系统时间
    int buf_index;
    int img_format;
    int fd[HB_VIO_BUFFER_MAX_PLANES];//ion buf fd
    uint32_t size[HB_VIO_BUFFER_MAX_PLANES];
    uint32_t planeCount;
    uint32_t dynamic_flag;
    uint32_t water_mark_line;
    VIO_DATA_TYPE_E data_type;
    buffer_state_e state;
} image_info_t;

2.征程 5 平台

其中的 tv 时间戳来源三种可选,通过设备树可以设置默认来源,通过 sys 节点可以动态临时修改来源

C 复制代码
typedef struct _frame_info_s{
        uint32_t frame_id;
        uint64_t timestamps;//hw_timestamp (硬件时间戳)
        struct timeval tv;// 系统时间(软件时间戳)
        uint32_t format;
        uint32_t height;
        uint32_t width;
        uint64_t addr[7];
        uint32_t pre_int;
        uint32_t num_planes;
        int32_t bufferindex;
        uint32_t pixel_length;
        uint32_t dynamic_flag;
} frame_info_t;

3.征程 6 平台

相较与 征程 5, 增加了 lpwm 信号的 trig 时间,同时 tv 时间中的 phc 由硬件自动缓存。

C 复制代码
typedef struct image_info_s {
        uint16_t sensor_id; /**< sensor id */
        uint32_t pipeline_id; /**< pipeline id */
        uint32_t frame_id; /**< frame id */
        uint64_t time_stamp; /**< HW time stamp */
        struct timeval tv; /**< system time of hal get buf */
        int32_t buf_index; /**< buffer index */
        int32_t img_format; /**< image format */
        int32_t fd[HB_VIO_BUFFER_MAX_PLANES]; /**< ion buf fd */
        uint32_t size[HB_VIO_BUFFER_MAX_PLANES]; /**< buffer size per plane */
        uint32_t planeCount; /**< image plane count */
        uint32_t dynamic_flag; /**< dynamic flag */
        uint32_t water_mark_line; /**< water mark line value */
        VIO_DATA_TYPE_E data_type; /**< buffer data type */
        buffer_state_e state; /**< buffer state */
        uint64_t desc; /**< temp description for isp raw feedback */
        struct timeval trig_tv;/**< system time of lpwm trigger */
} image_info_t;
相关推荐
知乎的哥廷根数学学派3 分钟前
基于物理信息嵌入与多维度约束的深度学习地基承载力智能预测与可解释性评估算法(以模拟信号为例,Pytorch)
人工智能·pytorch·python·深度学习·算法·机器学习
古城小栈5 分钟前
Rust 丰富&好用的 格式化语法
前端·算法·rust
AuroraWanderll22 分钟前
类和对象(六)--友元、内部类与再次理解类和对象
c语言·数据结构·c++·算法·stl
leaves falling24 分钟前
c语言-给定两个数,求这两个数的最大公约数
数据结构·算法
SamtecChina202325 分钟前
Electronica现场演示 | 严苛环境下的56G互连
大数据·网络·人工智能·算法·计算机外设
Tim_1025 分钟前
【C++入门】05、复合类型-数组
开发语言·c++·算法
jikiecui26 分钟前
信奥崔老师:三目运算 (Ternary Operator)
数据结构·c++·算法
无限进步_26 分钟前
【C语言&数据结构】另一棵树的子树:递归思维的双重奏
c语言·开发语言·数据结构·c++·算法·github·visual studio
t1987512827 分钟前
同伦(Homotopy)算法求解非线性方程组
算法