• 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 » ARM® Processors » Sitara™ ARM® » AM3x Sitara ARM Processors Forum » Beaglebone Pinmux Registers Appear to be Locked
Share
Sitara™ ARM®
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Beaglebone Pinmux Registers Appear to be Locked

Beaglebone Pinmux Registers Appear to be Locked

This question is not answered
vikesfan
Posted by vikesfan
on Aug 09 2012 15:44 PM
Prodigy70 points

I have a Beaglebone (Rev A3) connected to Code Composer 5.2 using the onboard USB/XDS100v2 JTAG emulator.  I've run and modified several of the StarterWare examples such as gpioLEDblink and UARTecho.  I'm now trying to enable the GPMC interface to the P8 expansion header for interfacing to an FPGA.  I'm able to successfully configure most of the internal AM3359 registers (GPMC_CONFIGx, etc.) but an unable to change the values of the pin muxing registers for the GPMC interface (CONF_GPMC_AD0, etc.).

The code I'm using is copied from the NANDPinMuxSetup function from the NAND libraries as follows:

HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(0)) =
( 0 << CONTROL_CONF_GPMC_AD0_CONF_GPMC_AD0_MMODE_SHIFT) |
( 0 << CONTROL_CONF_GPMC_AD0_CONF_GPMC_AD0_PUDEN_SHIFT) |
( 1 << CONTROL_CONF_GPMC_AD0_CONF_GPMC_AD0_PUTYPESEL_SHIFT) |
( 1 << CONTROL_CONF_GPMC_AD0_CONF_GPMC_AD0_RXACTIVE_SHIFT);

This should be setting the CONF_GPMC_AD0 register (0x44E10800) to a 0x00000030 (Mode 0).  However when I look at the value at that location via the memory viewer in the CCS debugger, I see the value is: 0x00000027 (Mode 7).  I thought perhaps the debugger is causing a reset of the board when the code halts which would change the value to a initial condition, so I added a read of the CONF_GPMC_AD0 register immediately before and after the above write and the value doesn't change from the 0x27 (Mode 7) value.

Is there a way these register can be "locked" from modification?  Is there anything else I should be checking?  Thank you.

AM335x Beaglebone pinmux FPGA
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Frank Van Hooft1
    Posted by Frank Van Hooft1
    on Aug 10 2012 18:31 PM
    Intellectual630 points

    They can appear locked if you're in user mode. You need to be in privileged mode to be able to change those registers.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vikesfan
    Posted by vikesfan
    on Aug 13 2012 07:45 AM
    Prodigy70 points

    Frank,

    Thank you for your reply.  I did verify that I was in user mode.  Changing to Priviledged or Supervisor Modes allowed me to change these pinmux register values.

    One thing I discovered in my troubleshooting of this issue.  In Code Composer, when I connect to the target (beaglebone in this case), the ARM core stays in Privildged mode.  When I Load a Program, the ARM core is sometimes placed in user mode.  If I import a project from one of the StarterWare examples, compile and load that program, the ARM core remains in priviledged mode.  If I create a new CCS project, copy over the same code, compile and load the program, the ARM core is placed in user mode.  I'm assuming there's somethin in the "cinit" code that gets executed prior to main() that setting this to user mode.  I haven't had a chance to dig into this yet.  Does anyone else have some insight on this?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JJD
    Posted by JJD
    on Aug 13 2012 09:59 AM
    Genius9210 points

    I think what is happening is that when you create the new project, you are using the original rts library that comes with CCS, which puts the processor in user mode before getting to main().  You can see this in boot.asm.  I believe Starterware is using its own cinit code which has been modified to stay in privileged mode.

    Regards,

    James

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Frank Van Hooft1
    Posted by Frank Van Hooft1
    on Aug 13 2012 10:58 AM
    Intellectual630 points

    To follow-up on what James said, the starterware code examples I've played with do configure the processor into user mode, in the cinit code. This has obviously caused problems for some of those examples, and hence somebody at TI wrote a "hack" to get around that problem for one of the starterware examples. The hack is the file super_startup.asm, which simply jumps over the first few bytes of the cinit code (which the author obviously knew was where the processor is put into user mode). Not pretty, but it works, at least in this case, and I've used that file in some of my own test code. I wouldn't suggest using it for production code, because if the cinit code changes, super-startup.asm may not work any more. Changing boot.asm would probably be a safer bet.

    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