Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Configuring external interrupt INT0

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Configuring external interrupt INT0
Moderator:
RSKV

Post Reply
Follow this topic



Configuring external interrupt INT0

giginjose posted on 12 Apr 2013 1:02 AM PST
Top Contributor
36 Forum Posts

 Hi, 

I am working on Cypress USB FX2LP controller (Cy7C68013A). I need to enable the external interrupt on INT0, as negative edge detecting. I had tried the following changes on bulkloop example on FX2LP. 

 

  PORTACFG = 0x03;            // PA0 and PA1 are INT0 and INT1

TCON |= 0x05;               // Detect INT0 and INT1 on fallinfg edge

IE  |= 0x05;    // Enable External Interrupts 0 and 1

After adding these lines in TD_Init() of the bulkloop example, the USB device was not getting enumerated by the EZ-USB Interface tool. 

Anyways, the enumeration works fine without these three lines of code in bulkloop example, and the device is detected as EZ-USB. 

What is wrong with the above code ? Is there anything more needed to be added to the enumeration to happen ? 

Thank You

With Regards

GIGIN JOSE

 




Re: Configuring external interrupt INT0

aasi posted on 20 Apr 2013 10:55 AM PST
Cypress Employee
1090 Forum Posts

most probably the interrupt is constantly getting triggered and interfering the running of enumeration sequence. Are these interrupts constantly being triggered? What is the code in the ISR of these interrupts? Have you tried tying the pins to a logic level so that the interrupt doesn't get tried, if so do you still see the issue?
Regards,
Anand
 



Re: Configuring external interrupt INT0

giginjose posted on 21 Apr 2013 09:22 PM PST
Top Contributor
36 Forum Posts

 Hi Anand, 

 

There were no hardware issues on the interrupt firing, but the system worked fine once I added a seperate file "isr.c" with the interrupt handler "ISR_EXTR0". Is it necessary to add seperate file for interrupt handler. Earlier, I had added the interrupt service routine in slave.c file.

Thank You

With Regards

Gigin Jose 



Re: Configuring external interrupt INT0

Gayathri posted on 02 May 2013 01:31 AM PST
Cypress Employee
428 Forum Posts

Hi, 

 

Please see http://www.cypress.com/?id=4&rID=27870.

 

INT0# is an 8051 interrupt and #pragma NOIV affects only the file in which it is mentioned. So, 8051 interrupts have to be placed in a separate file, without having #pragma NOIV statement.

 

Regards,

Gayathri






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20