• 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 » Using EMIF for data recording
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Using EMIF for data recording

This question has suggested answer(s)
Alex Dyer
Posted by Alex Dyer
on Jul 08 2012 18:06 PM
Intellectual540 points

Hi Everyone,

I've connected a 64Mbit NOR flash to the EMIF (using CS0), this device needs to be programmed before any data can be written to its addresses, looking at the data sheet and TMR the EMIF should be able to handle this via the use of specially written functions.

However I need to be sure the TMS570 will not try and access this address range in any of its background routines (or as a result of array generation from my code) as data can not be stored at these addresses with out preparing the NOR flash. 

Can you confirm that the TMS570 will not try and do this or alternatively indicate how the TMS570 can be set up to have this address range protected or access restricted?

Thanks in advance

Alex

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Zhaohong Zhang
    Posted by Zhaohong Zhang
    on Aug 10 2012 15:55 PM
    Genius9265 points

    Alex,

    You are right for the address. Are you using 16 bit or 8 bit mode? This EMIf supports 16 bit mode.

    Thanks and regards,

    Zhaohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 11 2012 11:37 AM
    Intellectual540 points

    Hi,

    Yes I am using 16bit mode.

    Alex

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 11 2012 14:48 PM
    Intellectual540 points

    Hi Zhaohong,

    This current situation does not make any sense, I've retested the the output from the TMS570 and can reconfirm the following:

    Firstly, when a write is tried at 0x60000AAA, the NOR pins A[0:21] observe 0x00555.

    Secondly, when a write is tried at 0x554, the NOR pins A[0:21] observe 0x002AB.

    Now, this brings a few questions to mind:

    If the NOR's A0 is meant to be connected to EMIF BA1, then why does the first write show the address 0x000555?  If the TMS570 was outputting on the pins EMIF BA1 and EMIF A[0:20], then the address observed by the NOR would be 0x0002AA.

    This goes for the second write too, the NOR should observe 0x000155, rather than the 0x0002AB that it currently observes.

    In addition it looks like the pin A0 is constantly pulled high, this is at all the addresses I've tried, I've checked and made sure it is not shorted to 3V3 or any of the other possible connections as well as making sure it is connected to the EMIF A0 pin.  I've also tested the address seen by the NOR chip when the TMS570 writes to 0x60000000, the output is 0x000001.

    Why would the TMS570 be keeping EMIF A0 high?

    Regards,

    Alex

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

    Alex,

    If you can send your complete norflash test, I can re-run the test as is on a board with external async SRAM. I can check check the contents in RAM at locations you tried to write.

    Thanks and regards,

    Zhaoohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 13 2012 17:23 PM
    Intellectual540 points

    Hi Zhaohong,

    Here is my up-to-date project files.

    0702.EB-EMIF-TI.zip

    Cheers,

    Alex

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 14 2012 05:48 AM
    Intellectual540 points

    While experimenting with the code I have found scenarios where A0 is in the logic low state, but this only occurs when there is a malfunction with the EMIF, where it constantly outputs 0x00016A no matter what TMS570 address I write too.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Zhaohong Zhang
    Posted by Zhaohong Zhang
    on Aug 14 2012 14:22 PM
    Genius9265 points

    Alex,

    Would you please reorganize the project? There is one include path "D:\PhD\TI\Global Inculde" missing.

    Thanks and regards,

    Zhaohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 14 2012 14:38 PM
    Intellectual540 points

    Hi,

    Sure, this is much appreciated, the missing files are the files I borrowed from your example.

    Here is the self contained project.

    3554.EB-EMIF-TI.zip

    Kind regards,

    Alex

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Zhaohong Zhang
    Posted by Zhaohong Zhang
    on Aug 16 2012 16:28 PM
    Genius9265 points

    Alex,

    It seems that there is something wrong with your software. It does not write into external memory in my test board. I need to debug at assembly level. I hope to find more details next week.

    Thanks and regards,

    Zhaohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 17 2012 07:44 AM
    Intellectual540 points

    Hi Zhaohong,

    I had a look at my code and yes there was something wrong with it, I've now corrected it, the project I'm now attaching shows the behaviour described in the previous posts.  I've tested the NOR but starting the address at 0x60000000 (0x000000) and incrementing it from there.  It shows that the BA1 pin is being toggled, or at least I assume so, the NOR does not observe a pin change until the address 0x60000004.

    In one instance of testing the NOR flash (from a "Restart" in CCS) the address A0 became active (i.e as per the address accessed the pin showed either a 0 or 1), however after another "Restart" (with no change in code, break points or any other feature) the address became unresponsive once more and has remained so despite many "Restarts" since.

    4774.EB-EMIF-TI.zip

    Kind regards,

    Alex

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

    Alex,

    "Restart" only sets PC to the location of "c_int00". To make the code execution repeatable, you need to have a clean start every time. I would suggest you always do an "advanced system reset" followed by a "CPU" reset. If your code is already programmed into Flash, you do not need to load it any more.

    Thanks and regards,

    Zhaohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 17 2012 11:28 AM
    Intellectual540 points

    Hi Zhaohong,

    Ok, I will use that procedure from now on.

    To look closer at the function of the EMIF I've used the following project where I've either run NOR_READ or NOR_WRITE independently.

    8400.EB-EMIF-TI (NOR_WR).zip

    To add to the picture here are some shots of the oscilloscope.  The following image is for NOR_WRITE, where Blue = CE, Green = WE, Red = A0 and Yellow = A1, all signals have been moved on the voltage scale to allow for easier viewing and reducing the risk of one signal masking the other (eg CE and WE), while the noise on the yellow line is due to the probe.

    I've also tested with Green = OE, just to see if anything was happening.

    The following image is for NOR_READ, where Blue = CE, Green = OE, Red = A0 and Yellow = A1

    Again I checked WE, Green = WE:

    In all, the pins WE and OE are not functional (though I'm sure that at on point in this project they were).  For NOR_READ the CE is operating as expected, 2 cycles per A0 cycle.  While for the NOR_WRITE there is no logical reason for the asymmetrical behaviour of the CE pin, especially as the code is identical to NOR_READ.

    Regards,

    Alex

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Zhaohong Zhang
    Posted by Zhaohong Zhang
    on Aug 17 2012 11:43 AM
    Genius9265 points

    Alex,

    I have tried the software you sent in the early morning. It can write to the external memory in my test board correctly. I wonder if there is a connection problem on WE between TMS570 and Norflash on your board. EMIF OE is a input signal. Norflash drives it to indicate data readiness during read operation. You should not see OE toggling during write operation.

    Thanks and regards,

    Zhaohong

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 17 2012 13:07 PM
    Intellectual540 points

    Hi,

    Yes, the OE should not toggle during write operations or vise versa, but as the TMS570 is not operating as expected I'm prepared to explore every avenue.

    On the NOR flash the OE pin is an input. The TMS570 datasheet shows the OE pin as an I/O how can I turn it into an output and use it as one?

    The WE connection has been tested as far as possible, with it confirmed form NOR pin to the fanout VIA before connection to the ball within the FBGA, the reflowed FBGA/PCB has also been x-rayed and there is no sign of any abnormality at that connection or those around it (which all function correctly).  The connection has also been confirmed pad to pad on non-populated boards.

    Alex

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alex Dyer
    Posted by Alex Dyer
    on Aug 17 2012 17:52 PM
    Intellectual540 points

    Well there has been progress.  There's no reason for the progress (no change in settings), so I wont be surprised if it does not work when I boot it up tomorrow.  However I'm going to live in hope. 

    Out of curiosity I downloaded and tried to run the project I posted this morning, it now works, without any changes.  In case it helps, to load a project I set it as "Active Project" then right click once more and select "Debug As" then "Debug Session".  Is the TMS570/ XDS100v2 @ 1MHZ a possible cause of the erratic TMS570 behaviour?

    Anyway there are still issues with the signalling so here is the new project:

    2642.EB-EMIF-TI - 21.zip

    Here is an image of the signals for writing to the addresses 0x60001554, 0x60000AA8 and 0x60001554 (these are the program addresses (555,2AA and 555))

    and the first read at 0x60000000

    where Blue = CE, Red = A0, Green = WE and Yellow = OE

    As you can see OE is perfect while WE is triggered 3 times per CE cycle with the last one occurring after A0 has changed, also 555 and 2AA are identical despite A0 should be 1 for 555 and 0 for 2AA.  Why is A0 changing mid write?

    Regards,

    Alex

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