THE INT PIN OF CYUSB3014

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

cross mob
lich_1335846
Level 1
Level 1

Hi,

Now I do not use the INT# of CYUSB3014-BZXC in the GPIF II Interface.

I want to generate the interrupt for the VBUS detect(USB Connect,USB Disconnect) to host processor(FPGA).

When I check the FX3 Programmers Manual,I think the below can realize it.

Is it right?

To enable a specific interrupt source(the vector is 21 GCTL_POWER), the firmware has to do the following:

■ Point the VIC_VEC_ADDRESS register to the ISR.

■ Set the VIC_VECT_PRIORITY register value as desired.

■ Enable the interrupt by setting the corresponding bit in the VIC_INT_ENABLE register.

The following code snippet shows the procedure for setting up Fx3IntHandler as the ISR for interrupt vector i:

CY_U3P_VIC_VEC_ADDRESS = Fx3IntHandler;/* ISR address. */

CY_U3P_VIC_VECT_PRIORITY = 2;/* Set the priority to 2. */

CY_U3P_VIC_INT_ENABLE |= (1 << i);/* Enable the interrupt. */

I think GCTL_POWER is related with LNK_INTR .

This event is detected

by the LTSSM_CONNECT bit of the LNK_INTR link layer interrupt register.

Thanks and Best Regards

Chunli

0 Likes
1 Solution

Hi Chunli Liang,

We don't have any existing firmware that can be used in your application.

However, please go through the procedure below and see if this can be used in your application:

1.) FX3 will detect the changes related to connect and disconnect using cases in the USBEventCB to detect CY_U3P_USB_EVENT_VBUS_VALID for VBUS connect event and CY_U3P_USB_EVENT_VBUS_REMOVED for VBUS disconnect event.

2.) Based on the event, we will update a variable and using that variable, we will send a notification to the FPGA using a DMA channel from CPU to PIB port of FX3.

2A.)Alternatively, when FX3 detects the events, we can update a variable and based on that we can toggle or assert a GPIO of FX3 which will be connected to the FPGA.

3.) The FPGA will have to detect this transfer and then do the necessary.

Which of the above process would work to your needs? Do go through and let me know.

Regards,

Yashwant

View solution in original post

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

Hi Chunli,

Can you please confirm what board you are using? Is it a custom board?

You don't need to do so much to detect VBUS connect and disconnect events.

You can just use the cases in the USBEventCB to detect CY_U3P_USB_EVENT_VBUS_VALID for VBUS connect event and CY_U3P_USB_EVENT_VBUS_REMOVED for VBUS disconnect event.


Please refer to cyu3usb.h file and check for CyU3PUsbEventType_t enum structure. You will be able to see all the events related to VBUS.

You can find it at path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_lib\1_3_4\inc\cyu3usb.h


You can just monitor these events and can convey the same information to the FPGA.

Regards,
Yashwant

0 Likes

Hi Yashwant

Thank you for your quick response.

Yes,in my custom board.

Indeed I want to use the INT# of CYUSB3014-BZXC to inform the FPGA.

And the FPGA access the CYUSB3014-BZXC to confirm the event.

Because the CYUSB3014-BZXC can not actively access the FPGA,

I want to use the INT# of CYUSB3014-BZXC to inform the FPGA.

Could you tell me how to use the INT# pin to inform the FPGA?

Thanks and Best Regards

Chunli Liang

2019年12月26日(木) 21:30 YashwantK_46 <community-manager@cypress.com>:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.thread>

THE INT PIN OF CYUSB3014

reply from YashwantK_46

<https://community.cypress.com/people/YashwantK_46?et=watches.email.thread>

in USB Superspeed Peripherals - View the full discussion

<https://community.cypress.com/message/219743?et=watches.email.thread#219743>

0 Likes

Hello Chunli Liang,

Can you please confirm whether your GPIF state machine is working in PP_MODE or normal mode?

INT# pin can be used only when FX3 is in PP_MODE.

Please refer to the section 7.4.6.1 in the FX3 TRM for details on PP_MODE.

Regards,
Yashwant

0 Likes

Hi Yashwant

Could you tell me how to confirm the mode.

And if it works in the PP_MODE ,can it use the GPIF to transfer the date

(SRAM method)?

Thanks and Best Regards

Chunli Liang

2019年12月30日(月) 20:39 YashwantK_46 <community-manager@cypress.com>:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.thread>

THE INT PIN OF CYUSB3014

reply from YashwantK_46

<https://community.cypress.com/people/YashwantK_46?et=watches.email.thread>

in USB Superspeed Peripherals - View the full discussion

<https://community.cypress.com/message/219960?et=watches.email.thread#219960>

0 Likes

Hi Chunli Liang,

Please refer to the document in the SDK path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware\FX3_TRM.pdf

Please go through the sections: 7.4.6.1, 7.4.7- explains about the addressing methods in PP_MODE and 10.7.1- GPIF_CONFIG register values.

The above sections explains about the usage of PP_MODE and the corresponding register settings that are to be set and handled.

Hope this helps you understand the PP_MODE better.


Regards,Yashwant

0 Likes

Hi,Yashwant

Just idear,

In the example of firmware,is there some sample to directly access the

register and write the data of the register to buffer and return to the

host?

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware

Thanks and Best Regards,

Chunli Liang

2020年1月6日(月) 20:25 YashwantK_46 <community-manager@cypress.com>:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.thread>

THE INT PIN OF CYUSB3014

reply from YashwantK_46

<https://community.cypress.com/people/YashwantK_46?et=watches.email.thread>

in USB Superspeed Peripherals - View the full discussion

<https://community.cypress.com/message/220341?et=watches.email.thread#220341>

0 Likes

Hi,Yashwant

I am sorry,repair it.

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

Just idear,

In the example of firmware,is there any sample to directly access the

register and write the data of the register to buffer and return to the

FPGA or likely?

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

Thanks and Best Regards,

Chunli Liang

2020年1月7日(火) 9:32 梁春利 <liangchunli@stormyberg.com>:

Hi,Yashwant

Just idear,

In the example of firmware,is there some sample to directly access the

register and write the data of the register to buffer and return to the

host?

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware

Thanks and Best Regards,

Chunli Liang

2020年1月6日(月) 20:25 YashwantK_46 <community-manager@cypress.com>:

>> <http://www.cypress.com>

>> Cypress Developer Community

>> <https://community.cypress.com/?et=watches.email.thread>

>> THE INT PIN OF CYUSB3014

>>

>> reply from YashwantK_46

>> <https://community.cypress.com/people/YashwantK_46?et=watches.email.thread>

>> in USB Superspeed Peripherals - View the full discussion

>> <https://community.cypress.com/message/220341?et=watches.email.thread#220341>

>>

0 Likes

Hi Chunli Liang,

We don't have any existing firmware that can be used in your application.

However, please go through the procedure below and see if this can be used in your application:

1.) FX3 will detect the changes related to connect and disconnect using cases in the USBEventCB to detect CY_U3P_USB_EVENT_VBUS_VALID for VBUS connect event and CY_U3P_USB_EVENT_VBUS_REMOVED for VBUS disconnect event.

2.) Based on the event, we will update a variable and using that variable, we will send a notification to the FPGA using a DMA channel from CPU to PIB port of FX3.

2A.)Alternatively, when FX3 detects the events, we can update a variable and based on that we can toggle or assert a GPIO of FX3 which will be connected to the FPGA.

3.) The FPGA will have to detect this transfer and then do the necessary.

Which of the above process would work to your needs? Do go through and let me know.

Regards,

Yashwant

0 Likes

Hi,Yashwant

Thank you for your advice.

Now I do not want to change the schematic.

So now I do not want to use 2A.) to realize it.

I want to confirm the method 2.) with you.

>>2.) Based on the event, we will update a variable and using that

variable, we will send a notification to the FPGA using a DMA channel from

CPU to PIB port of FX3.

→Is there any example for this to reference?

Thanks and Best Regards

Chunli Liang

2020年1月10日(金) 17:04 YashwantK_46 <community-manager@cypress.com>:

<http://www.cypress.com>

Cypress Developer Community

<https://community.cypress.com/?et=watches.email.thread>

THE INT PIN OF CYUSB3014

reply from YashwantK_46

<https://community.cypress.com/people/YashwantK_46?et=watches.email.thread>

in USB Superspeed Peripherals - View the full discussion

<https://community.cypress.com/message/220814?et=watches.email.thread#220814>

0 Likes

Hello Chunli Liang,

Can you please tell which example firmware you are using?

Can you please share the interface snippet?

Also, in your custom board, do you have any unused pins in the interface?

Regards,
Yashwant

0 Likes