Announcements
IMPORTANT: Cypress Developer Community currently doesn’t allow sign-in to prepare for the upcoming transition. To learn more, check out our announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

HuYa_4249091
Contributor

Hi All:

I referred the AN75779 document to achieve the UVC device, and it works!

However, I met a trouble to define the Camera Terminal - Exposure Time (Absolute) Control.

I don’t know how to define that... It’s more difficult than the Processing Unit, such as Brightness Control.

I also refer the “USB Device Class Definition for Video Devices v1.5.pdf” for the control function, but it don’t describe the rule detailed.

Now I just know the Exposure Time (Absolute) Control is defined by “2 to the power of n”, and the resolution(one step) is to change the “n”.

[Goat]

Total Step: 10(-10 ~ -1)

Max value: 1024

Min value: 1

Default value: 256

[My Setting]

code1.jpg

code2-2.jpg

[My Result]

It’s strange... (Checked the actual setting value by UART)

max value2.jpg

The slider range: -13 ~ -3

Max value: 1024

Min value: 1

Each step value

data.jpg

Hope somebody could provide me some suggestions, or provide an example by my [Goat].

Thank you so much!

Hughes

0 Likes
1 Solution
FeYu_1508691
New Contributor II

hello,

Windows using log2() second to get/set exposure time.

Your max/min value (4/2) means 0.4ms and 0.2ms,

and

log2(0.0004) = -11.28771,

log2(0.0002) = -12.28771.

so the result is -11 and -12.

KSPROPERTY\_CAMERACONTROL\_EXPOSURE - Windows drivers | Microsoft Docs

Hope this helps.

View solution in original post

3 Replies
KandlaguntaR_36
Moderator
Moderator

Hello Hughes,

It is defined as follows in one of the reference firmware.

VideoControl_uint8_t  aeModeCam              = {0x2,0x2,0x4,0x2,0x2,0x2};

typedef struct VideoControl_uint8

{

  uint8_t CurrentVal; /*Current Value of the feature*/

  uint8_t MinVal;     /*Minimum Value supported by the feature*/

  uint8_t MaxVal;     /*Maximum Value supported by the feature*/

  uint8_t Res;        /*Resolution supported by the feature*/

  uint8_t DefaultVal; /*Default Value of the feature*/

  uint8_t SetVal;     /*Set Value sent by the host application*/

} VideoControl_uint8_t;

I will check with the respective sensor and get back to you.

Regards,

Sridhar

0 Likes
HuYa_4249091
Contributor

Dear Sridhar:

Thanks for your reply!

I experimented the setting you provided, and the slider range is -12 & -11 on the UVC AP:

Sridhar Setting.jpg

Could you explain why the Maximum:0x4 & Minimum:0x2 will caused the slider which shows -11 & -12 respectively?

The following figure is the introduction from “USB Device Class Definition for Video Devices v1.5.pdf”, but I cannot understand still...

spec - exposure time.jpg

Thank you!

Hughes

0 Likes
FeYu_1508691
New Contributor II

hello,

Windows using log2() second to get/set exposure time.

Your max/min value (4/2) means 0.4ms and 0.2ms,

and

log2(0.0004) = -11.28771,

log2(0.0002) = -12.28771.

so the result is -11 and -12.

KSPROPERTY\_CAMERACONTROL\_EXPOSURE - Windows drivers | Microsoft Docs

Hope this helps.

View solution in original post