• 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 » Microcontrollers » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » GIOA 7 Pushbutton interrupt.
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

GIOA 7 Pushbutton interrupt.

This question is answered
Cristiano Werner Araujo
Posted by Cristiano Werner Araujo
on Apr 04 2012 23:26 PM
Intellectual280 points

Hello,

I'm trying to use the interrupt of the RM48 using halcogen.

I have done a simple control to the push button ( polling ).

---------------------------

 if( gioGetBit(gioPORTA,7)) 
{
hetREG1->DOUT = 0x00000000;
}
else
{
hetREG1->DOUT = 0xFFFFFFFF;
}

----------------------------

and it is working. But when I run 

" gioEnableNotification(7); "

nothing happens, I've putted a breakpoint the callback "gioNotification(int bit)".

To configure the interrupts in HalCoGEN I've done the following steps.

1. Created a RM4x, TMDXRM48HDK project.

2.  Set GIO driver compilation in Driver Enable Tab

3. Enabled IRQ Handling via VIC Controller in Cortex-R4F tab

4. Set IRQ to vectored mode in Interrupts Bab

5. Enabled GIO Low Interrupt ( 23 ) to IRQ in VIM Channel 0-31

6. Enable the Interrupt in Gio Tab to Pin 7

6.1 Diretion is input

6.2 Pull down enabled

6.3 Falling Edge interrupt

6.4 Low Priority interrupt

In the sys_main I've called :

gioInit();

gioEnableNotification(7);

runned it and pushed the button, but no gioNotification was generated.

I'm missing something ? Is there any Init() I've to do to activate interrupts ?

Thanks,

Cristiano

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 05 2012 17:28 PM
    Verified Answer
    Verified by Cristiano Werner Araujo
    Genius10315 points

    Cristiano,

    I'm trying to duplicate your problem.

    I will be back to you as soon as I have a result.

    By the way, are you enabling IRQ interrupt at the CPU level?
    I don't see in your code a call to _enable_IRQ();

    By default, after reset, the interrupt (IRQ and FIQ/NMI) are disable at the CPU level.
    You have to enable interrupt once your application is ready.

    The init in VIM will just send the request (IRQ or FIQ/NMI) to the CPU. If the CPU is not interrupt ready, your code will not jump in your ISR.

    Please can you confirm this point?

    Thanks and Regards,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Cristiano Werner Araujo
    Posted by Cristiano Werner Araujo
    on Apr 05 2012 23:33 PM
    Intellectual280 points

    Hello Jean-Marc,

    yes, in _enable_interrupt_(); call was missing, I think the name changes from version to version in Halcogen.

    but using it made it work.

    I thought the gioEnableNotification(7); did it, and the global got enabled by default.

    one sugestion to the HalCoGen team is to do more interrupt examples, it has only one.

    Thanks a lot for your help !

    Cristiano

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Apr 09 2012 09:43 AM
    Verified Answer
    Verified by Cristiano Werner Araujo
    Genius10315 points

    Cristiano,

    Thanks for your comment.

    I will communicate this to our Halcogen Development team.
    All inputs are always welcome.

    I want to make one additional comment.
    The GIO capture are only working when the CPU is running.
    In other words, when you stop execution, if you try to set and clear an IO pin in order to generate a rising/falling edge, the capture block in the GIO module will not capture the edge.

    Best Regards,

    Jean-Marc

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    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