• 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 » Tiva™ ARM® Microcontrollers » Tiva™ ARM® C Series Microcontrollers Forum » Programming internal EEPROM with Interrupts
Share
Tiva™ ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Programming internal EEPROM with Interrupts

Programming internal EEPROM with Interrupts

This question is answered
Jan Stolle
Posted by Jan Stolle
on Aug 07 2012 04:06 AM
Intellectual405 points

Hi!

I am using the lm4f eval board and want to program an array into the eeprom.

For this I use the EEPROMProgramNonBlockin Function with the first value followed by the EEPROMIntEnable and Master Interrupt enable.

The EEPROM is activated by clock handler first and I also call the EEPROMInit() function.

I put my EEPROMIntHandler in the startup_ccs.c at the position of FLASH Control. In the Interrupt Handler I want to clear the interrupt and start the write of the nex value.

Now my problem is, that the interrupt never gets called. The first value is written, but the handler is never reached. The rest of the program runs ok.

 

I can see that the EEPROM Write with Increment Value in the EEPROM Register is periodically loaded with the first value and the Current Address Offset is incrementing from 0 by 2 to E and restarting. The EEINT stays at 1, but the Interrupt is never entered (breakpoint at entry).

Am I missing something?

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Stellaris John
    Posted by Stellaris John
    on Aug 07 2012 13:45 PM
    Intellectual2190 points

    Jan,

    Can you post your initialization code and interrupt handler? If the EEPROMIntEnable function wasn't passed the parameter of EEPROM_INT_PROGRAM, it might cause the problem you're seeing.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jan Stolle
    Posted by Jan Stolle
    on Aug 08 2012 01:45 AM
    Intellectual405 points

    Hi John,

    thanks for your reply. The EEPROM_INT_PROGRAM was passed to the function.

    the relevant code in my program is as follows:

    Init_Clock(void)

    { SysCtlClockSet(
       SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ
         | SYSCTL_OSC_MAIN);

     SysCtlPeripheralEnable(SYSCTL_PERIPH_EEPROM0); //enable EEPROM

    ...}

    main()

    {

    Init_Clock();

    EEPROMInit();    //from eeprom.c

    IntMasterEnable(); //enable Interrupts

    ...

    while(1)

    {

    EEPROM_Write_DataBuffer(Data, Address);

     

    ...

    }

    }//end of main

    uint8 EEPROM_Write_DataBuffer(uint32_t ui32_Data, uint32_t ui32_EEPR_Address)
    {
     uint8 ub_Error = 0;

     ub_Error = EEPROMStatusGet();

     if (ub_Error == 0)  {
       EEPROMProgramNonBlocking(ui32_Data, ui32_EEPR_Address);
       EEPROMIntEnable(EEPROM_INT_PROGRAM);
      return (0);
     }
     else
     {
      return (ub_Error); //EEPROM still busy or other error. Please try again later.
     }
    }

    in Startup_ccs.c

      EEPROMIntHandler,// FLASH Control

    in Interrupts.c

    void EEPROMIntHandler(void)
    {
     EEPROMIntClear(EEPROM_INT_PROGRAM);            //This point is never reached (breakpoint in debug mode)

    if (data_ready==TRUE){        //program more

       EEPROMProgramNonBlocking(ui32_MoreData, ui32_EEPR_OtherAddress);
       EEPROMIntEnable(EEPROM_INT_PROGRAM);}

    else{

    EEPROMIntDisable(EEPROM_INT_PROGRAM);

    }

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jan Stolle
    Posted by Jan Stolle
    on Aug 08 2012 09:00 AM
    Verified Answer
    Verified by Jan Stolle
    Intellectual405 points

    I found the problem with the help of an FAE from TI.

    In addition to the EEPROMIntEnable(EEPROM_INT_PROGRAM) the INT_FLASH had to be enabled via IntEnable(INT_FLASH). I thought this was done already with the EEPROMIntEnable Routine, but turns out it has to be done extra.

    Now the Interrupt is executed correctly and the phenomenon with the incrementing offset has stopped also.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Stellaris John
    Posted by Stellaris John
    on Aug 08 2012 10:07 AM
    Intellectual2190 points

    Jan,

    Thanks for replying with the answer. It looks like we both shared the assumption about the EEPROMIntEnable enabling the flash interrupt. Feel free to mark your most recent post as "Verified Answer" to assist future forum users.

    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