• 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 » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » EPI problems with the LM3S9D92
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Forums

    EPI problems with the LM3S9D92

    This question is not answered
    Maurice Givens
    Posted by Maurice Givens
    on Apr 09 2012 15:24 PM
    Intellectual350 points

    I am using the LM3S9D92 eval kit with CCS5. I am trying to use the EPIO on the controller, however I see no activity on the ALE (EPIOS30, PJ6), the WE (EPIOS29, PJ5), or the A1 (EPIOS1, PH2) lines.

    The set-up code is

    #define EPI_PORTC_PINS  (GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)

    #define EPI_PORTE_PINS  (GPIO_PIN_0 | GPIO_PIN_1)

    #define EPI_PORTF_PINS  (GPIO_PIN_4 | GPIO_PIN_5)

    #define EPI_PORTG_PINS  (GPIO_PIN_0 | GPIO_PIN_1)

    #define EPI_PORTH_PINS  (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 |  GPIO_PIN_3 | \

                             GPIO_PIN_4 | GPIO_PIN_5)

    #define EPI_PORTJ_PINS  (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | \

                             GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6)

     

    #define MEM_START_ADDRESS 0X000000

     

        SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0);

     

        GPIOPinConfigure(GPIO_PH3_EPI0S0);

        GPIOPinConfigure(GPIO_PH2_EPI0S1);

        GPIOPinConfigure(GPIO_PC4_EPI0S2);

        GPIOPinConfigure(GPIO_PC5_EPI0S3);

        GPIOPinConfigure(GPIO_PC6_EPI0S4);

        GPIOPinConfigure(GPIO_PC7_EPI0S5);

        GPIOPinConfigure(GPIO_PH0_EPI0S6);

        GPIOPinConfigure(GPIO_PH1_EPI0S7);

        GPIOPinConfigure(GPIO_PE0_EPI0S8);

        GPIOPinConfigure(GPIO_PE1_EPI0S9);

        GPIOPinConfigure(GPIO_PH4_EPI0S10);

        GPIOPinConfigure(GPIO_PH5_EPI0S11);

        GPIOPinConfigure(GPIO_PF4_EPI0S12);

        GPIOPinConfigure(GPIO_PG0_EPI0S13);

        GPIOPinConfigure(GPIO_PG1_EPI0S14);

        GPIOPinConfigure(GPIO_PF5_EPI0S15);

        GPIOPinConfigure(GPIO_PJ0_EPI0S16);

        GPIOPinConfigure(GPIO_PJ1_EPI0S17);

        GPIOPinConfigure(GPIO_PJ2_EPI0S18);

        GPIOPinConfigure(GPIO_PJ3_EPI0S19);

        GPIOPinConfigure(GPIO_PH6_EPI0S26);

        GPIOPinConfigure(GPIO_PH7_EPI0S27);

        GPIOPinConfigure(GPIO_PJ4_EPI0S28);

        GPIOPinConfigure(GPIO_PJ5_EPI0S29);

        GPIOPinConfigure(GPIO_PJ6_EPI0S30);

     

        GPIOPinTypeEPI(GPIO_PORTC_BASE, EPI_PORTC_PINS);

        GPIOPinTypeEPI(GPIO_PORTE_BASE, EPI_PORTE_PINS);

        GPIOPinTypeEPI(GPIO_PORTF_BASE, EPI_PORTF_PINS);

        GPIOPinTypeEPI(GPIO_PORTG_BASE, EPI_PORTG_PINS);

        GPIOPinTypeEPI(GPIO_PORTH_BASE, EPI_PORTH_PINS);

        GPIOPinTypeEPI(GPIO_PORTJ_BASE, EPI_PORTJ_PINS);

     

        EPIDividerSet(EPI0_BASE, 0);

     

        EPIModeSet(EPI0_BASE, EPI_MODE_HB16);

     

        EPIConfigHB16Set(EPI0_BASE, EPI_HB16_MODE_ADMUX | EPI_HB16_WRWAIT_0 | \

                             EPI_HB16_RDWAIT_0 | \

                                   EPI_HB16_CSCFG_ALE, 0x01);

     

        EPIAddressMapSet(EPI0_BASE, EPI_ADDR_RAM_SIZE_16MB |EPI_ADDR_RAM_BASE_6);

     

        MEM_ADDR_PTR = (unsigned long *)0x60000000;

     

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOJ);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);

        SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);

     

    The code to do the operation is

    void  Timer0BIntHandler(void)

    {

          unsigned long     z[1];

     

          ADCProcessorTrigger(ADC0_BASE, 3);

          TimerIntDisable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

          TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

          GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_4, 0x10);

     

          if (count < Samp)

          {

                while (!ADCIntStatus(ADC0_BASE,3,false))

                {

                }

                ADCSequenceDataGet(ADC0_BASE, 3, z);

                ADCIntClear(ADC0_BASE, 3);

                MEM_ADDR_PTR[MEM_START_ADDRESS + count] = z[0];

                count++;

                TimerIntEnable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

                GPIOPinWrite(GPIO_PORTE_BASE, DSP_SENSOR_PINS, 0x00);

          }

          else

          {

                TimerDisable(TIMER0_BASE, TIMER_B);

                TimerIntDisable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

                ADCIntClear(ADC0_BASE, 3);

                GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_4, 0x00);

                Analyze();

          }

    }

     

    Everything seems to work except the EPIO.

    Any suggestions/help?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Maurice Givens
      Posted by Maurice Givens
      on Apr 17 2012 15:55 PM
      Intellectual350 points

      Mitch,

      Thre must be something in the project configuration, or something I'm not enabling, or something I'm not setting. I download you *.bin using LMFlashProgrammer, all the lines toggle. Your image works. Also, I tried a version with a SDRAM EPIO configuration, and the refresh writes are there, but nothing else; no address lines, etc. So, there must be something in my configuration or initialization files.

       

      Maurice

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Maurice Givens
      Posted by Maurice Givens
      on Apr 17 2012 16:14 PM
      Intellectual350 points

      Mitch,

      Can you send me a copy of the c-code you used for the EPIO test? Maybe there is something you are automatically adding (since it must obviously be there), that I don't have included, or don't know to add. What ever you did works.

       

      Maurice

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Stellaris Mitch
      Posted by Stellaris Mitch
      on Apr 18 2012 10:07 AM
      Intellectual2170 points

      Hi Maurice,

      I put the source file in the ZIP linked to this post. 

      2313.epi_hb16_2_c.zip

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Maurice Givens
      Posted by Maurice Givens
      on Apr 18 2012 14:56 PM
      Intellectual350 points

      Mitch,

      I compiled your code, and it works. I get the signals. I checked my code against yours, line-by-line, word-by-word, and mine didn't work. The only difference I could see was that you had all your code in one file. I split  the initializations and header file into separate files.

       

      I generated a new project with my code, but this time put everything in one file, and it works.

       

      Is it possible that the preprossor, compiler, or linker (or all 3) are trying to optimise something and messing it up? Is there a way to set the configuration properties to test this? I would hate to be required to put everything in one large file.

       

      Can you put the init_CLK, init_GPIO, etc in separate files, and put the defines, and prototypes in a header file, and then compile to see if you get the same problem?

       

      Maurice

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Alan Nilsson
      Posted by Alan Nilsson
      on Apr 19 2012 00:31 AM
      Prodigy190 points

      Maurice Givens
      Is it possible that the preprossor, compiler, or linker (or all 3) are trying to optimise something and messing it up? Is there a way to set the configuration properties to test this? I would hate to be required to put everything in one large file.

      Turn off optimizations and rebuild.  Common problem here is to make sure that any variable used in main line and an interrupt is declared volatile.

      However, it is more likely that you have something misconfigured in your CCS project file.

      Maurice Givens
      Can you put the init_CLK, init_GPIO, etc in separate files, and put the defines, and prototypes in a header file, and then compile to see if you get the same problem?

      Doesn't matter if you have 1 file or 1000, as long as the compiler knows how to put them together.  I do not use CCS so I can't speak specifics of that tool chain, but GCC tool chain includes tools like readelf, objdump, nm that are very useful for stuff like this.  Joe can probably tell you what the analog is for CCS.  If you build your "non working" project and Joe's "working" project, you can then use these tools to look at the resulting images to see what is missing in the non working version.  With that info you can go back to your project file and have a pretty good idea where to look.

      Also the linker should output a map file that will tell you how the image is put together.  Compare the two, find the differences.

      Good luck

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Maurice Givens
      Posted by Maurice Givens
      on Apr 19 2012 09:38 AM
      Intellectual350 points

      >>Turn off optimizations and rebuild.  Common problem here is to make sure that any variable used in main line and an interrupt is declared volatile.

      That was already done.

      >>Doesn't matter if you have 1 file or 1000

      Obviously it does!

      >>it is more likely that you have something misconfigured in your CCS project file.

      This was my original question after I was able to get things to work by putting everything in 1 file. The question is what in the configuration file needs to be set/changed/unset/modified to cure this problem. If the files are separated and compiled, is the problem repeatd at TI? For now, the only work-around I have is putting everything in 1 file.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Alan Nilsson
      Posted by Alan Nilsson
      on Apr 19 2012 12:40 PM
      Prodigy190 points

      Maurice Givens
      That was already done.

      Then why ask the question if the first place?

      Maurice Givens
      If the files are separated and compiled, is the problem repeatd at TI? For now, the only work-around I have is putting everything in 1 file.

      It would be nice if TI had the resources to test everyone's project who is having problems, but that is quite an onus on them, yes?  My only point being that there are things you could be doing to figure this out on your own.  Putting everything in one file is a work around, but you do have the option to dig into the working and non-working images, finding out whats wrong, and fixing the problem in lieu of a applying band aid.  A lot more work? sure - the first time,  but you'll certainly understand how your code goes together much better:)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    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