How to change the report interval during operation of device?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DiDi_4439146
Level 3
Level 3
First solution authored 10 sign-ins 10 replies posted

Hi I have a usb device  which starts with bInterval - 0, so a 125uS report interval. I want to change this to bInterval = 3 so a 1000uS report interval during the operation of the device. How is this done? does the configuration descriptor need to be resent or is it possible to do with cy api?

0 Likes
1 Solution

Hi,


You can do the following when you want to change the bInterval value:

1.) call CyU3PConnectState(CyFalse, CyFalse)          //this will cause the USB block to disconnect and disappear from control centre

2.) Change the descriptor values and store it in firmware according to your application and then commit to host when there is a next GET_DESCRIPTOR request.

3.) call CyU3PConnectState(CyTrue, CyTrue)               //this will make the USB block to enumerate the device

You can refer to the SDK example: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulklpautoenum


Please go through the firmware and understand how the descriptors are sent from the firmware.

You can use a similar implementation for your application.

Regards,

Yashwant

View solution in original post

0 Likes
3 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,

The above process can't be taken care by Cy api library.

There will surely need to be disconnect event and a flag which can be incremented on a disconnect.

So, the first time you connect, bInterval - 0 will be sent and a flag is updated

Disconnect the device from host

Then based on flag condition, send the second bInterval settings.

You will have to develop a logic in the dscr.c file to send a specific endpoint descriptor based on a flag value.

But, there should be a physical device disconnect. Please confirm that this can be implemented for your application.


Regards,Yashwant

0 Likes

So I understand how to do it with physical device disconnect, but my use case doesn't allow for that. Is there a way to do this without physical disconnect? Maybe just to send updated config descriptor and reinitialize the device or something?

0 Likes

Hi,


You can do the following when you want to change the bInterval value:

1.) call CyU3PConnectState(CyFalse, CyFalse)          //this will cause the USB block to disconnect and disappear from control centre

2.) Change the descriptor values and store it in firmware according to your application and then commit to host when there is a next GET_DESCRIPTOR request.

3.) call CyU3PConnectState(CyTrue, CyTrue)               //this will make the USB block to enumerate the device

You can refer to the SDK example: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulklpautoenum


Please go through the firmware and understand how the descriptors are sent from the firmware.

You can use a similar implementation for your application.

Regards,

Yashwant

0 Likes