• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Proprietary Software & SimpliciTI Forum » CC1110: an I/O pin which has been configured as a output pin can cause an external interrupt ! why?
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

CC1110: an I/O pin which has been configured as a output pin can cause an external interrupt ! why?

CC1110: an I/O pin which has been configured as a output pin can cause an external interrupt ! why?

This question is not answered
boomh
Posted by boomh
on Oct 19 2011 04:53 AM
Prodigy175 points
  • I am using CC1110 . I  use the P0_7 as an external interrupt source which connect with a  press button . so I configure  P0_7 as a input pin while all other pins of P0 as output pin, like this:

 P0SEL |= 0x03;  
  P0 |= 0x3f;      
  P0DIR |= 0x3f; 

the interrpt configration codes are the following:

   P0IF =0;
   P0IFG = 0x00;
 
   PICTL |= PICTL_P0ICON;        //fall edge
   PICTL |= PICTL_P0IENH;        

   INT_ENABLE(INUM_P0INT, INT_ON);

and the interrupt routine  are the following:

#pragma vector = P0INT_VECTOR
__interrupt void  KEY_ISR(void)
{
 
      INT_ENABLE(INUM_P0INT, INT_OFF);    
      if (P0IFG & BIT7)   {    //key
         
         P0IFG &= ~BIT7;      // Clear status flag for pin
         f_keyint = 1;    
      }
      else if (P0IFG & BIT6)  
         P0IFG &= ~BIT6;   

      else if (P0IFG & BIT5)   
         P0IFG &= ~BIT5;   
      else if (P0IFG & BIT4) 
         P0IFG &= ~BIT4;    
      P0IF =0;              // Clear CPU interrupt status flag
      INT_ENABLE(INUM_P0INT, INT_ON);
 }

at this time, a unusual phenomenon  presented : before  I press the button , external interrupt  occoured  frequently . the interrupt source is P0_5 or P0_4 .

what does the phenomenon mean?

any ideas? thanks a lot !

cc1110
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • TIABO
    Posted by TIABO
    on Oct 25 2011 03:20 AM
    Expert6765 points

    What are pins P0.5 and P0.6 connected to on your board? Do you see any noise on these pins?

    From what I see, your code looks ok. However, the CC1110 datasheet states in section 12.4.4 that you should always clear the IO module's interrupt flags (P0IFG register) prior to clearing the CPU's interrupt flag (IRCON.P0IF). Another tip, you should implement some kind of software debounce on your button to be sure a single button click doesn't trigger multiple interrupts.

    Br,
    ABO 

    --
    If this post answered your question, thank you for clicking  Verify Answer 

    cc1110 interrupts
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • boomh
    Posted by boomh
    on Oct 27 2011 08:00 AM
    Prodigy175 points

        thank you for your reply!

        now  the phenomenon  presented  enen when  I  connect nothing  at all  I/O ports.  (all pins are  impending ). It seems that  pressing key  is not needed   that the external interrupt  occoured  over and over. It  looks like it  works by itself .

       Regards:

       bob hong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Siri
    Posted by Siri
    on Nov 02 2011 03:04 AM
    Expert4740 points

    Hi

    For Port 0 and port 2 you can only enable/disable interrupts for 4 and 4 pins at the time. That means that is interrupt is enabled for let's say port0 pin 4 - 7 any activity on either of these pins will cause an interrupt, even if the pin is configures as an output.

    If you use port1 instead you can enable/disable interrupts for each and every pin.

    Br

    Siri

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • boomh
    Posted by boomh
    on Nov 06 2011 23:28 PM
    Prodigy175 points

    thank you ! I think this is not very convenient for a designer. I have to change my design again!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content 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. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

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 of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content 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.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use