• 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 Expansion bus module in TMS470R1B1M
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

Using Expansion bus module in TMS470R1B1M

This question is not answered
Prasad Go
Posted by Prasad Go
on Mar 16 2012 16:08 PM
Prodigy95 points

Hello

I am trying to use Expansion bus module in TMS470R1B1M to interface with external flash memory (64MB Spansion Paraller-NOR Flash). Configured EBM as per SPNA101 & SPNU222C application notes Attached file ebm.c is the EBM initialization file. When I write to the address in the expansion bus from my main routine in main.c, I don't see any thing on the io pins.

S29GL512P is interfaced to TMS470 using
26 pin address bus / expansion bus (EBADDR0-EBADDR18 & HET0-HET6)  to A0-24 on Flash memory &
16-bit data bus(EBDATA0-EBDATA15)  to DQ0-15 on Flash memory
EBCS5 to CE on Flash memory
EBOE to OE on Flash memory
EBWR0 to WE on Flash memory
I2C2SDA to ACC/WP on Flash memory
I2C2SCL to RESET on Flash memory
GIOA3 to RY/BY on Flash memory

Am I missing any thing here? Do you have any example of using Expansion bus module, for external flash memory.

Thanks
- Prasad

= ====================ebm.c============================
#include <intrinsics.h>
#include "iotms470r1b1m.h"
#include "tms470r1B1m_bit_definitions.h"
#include "basic_functions.h" 

void emb_init(void)
{
// Expansion bus DMA request signals are not mapped to the i/o pins
EBDMACR = 0x00;
// 7:0 EBDMAREQ[7:0] = 0x00; none mapped to the i/o pins

// Added to the main routine to setup the EBM registers for Writing
EBMCR1=0x02; // EBM Control register
// 7:6 Reserved = 00; Reserved
// 5:3 0 = 000; 0 by default
// 2:1 DSIZE = 01; 16 bit Data bus width
// 0 LPM = 0; Low power down mode; Module is not Locally powered down

EBRWCR=0x7F; // EBM Read/Write Control Register
// 7 EBHOLD = 0; The HOLD not mapped to an external device
// 6:3 EBCS[3:0] = 1111; EB Chip Selects [3:0] mapped to the Mux Output
// 2:1 EBWR[1:0] = 11; EB Write Enable bits [1:0] mapped to the Mux Output
// 0 EBOE = 1; The Output Enable bit mapped to the Mux Output

//The next four Registers Map Addresses [29:0] to the Mux Output
EBACR1=0x3F; // EBM Address Control Register [5:0]
// 7:6 EBWR[3:2] = 00; EB Write Enables EBWR[3:2] NOT mapped to the Mux Output
// 5:0 EBADDR[5:0] = 11111; EB Address Lines EBADDR[5:0] are mapped to the Mux Output

EBADCR=0xFF; // EBM Address/Data Control Register
// 7:0 EBDATA[15:8] = 11111111; Data lines EBDATA[15:8] are mapped to the mux output. (In 16-bit Mode)

EBACR2=0xFF; // EBM Address Control Register [13:6]
// 7:0 = EBADDR[13:6] = 0xFF; EBaddress Lines EBADDR[13:6] are mapped to Mux Output. (In 16-bit Mode)

EBACR3=0x1F; // EBM Address Control Register [21:14]
// 7:0 = EBADDR[21:14] = 0x1F; EBaddress Lines EBADDR[18:14] are mapped to Mux Output. (In 16-bit Mode)

// and address lines [25:19] are mapped to GPIO / HET

//The next Register Maps the 8 bit Data to the Mux Output
EBDCR=0xFF; // EBM Data Control Register D7:D0
// 7:0 = EBDATA[7:0] = 0xFF; EBData Lines EBDATA[7:0] are mapped to Mux Output.
// Data Lines D7:D0 are Mapped to the Mux Output

// Write control register
WCR0 = 0x0001;
//15:2 = Reserved = b0000 0000 0000 00; Reserved bits
//1 = WTWSOVR = b0; Wait trailing state over ride - Atleast one traling state (not defined by TWS)
//0 = WBENABLE = b1; Write buffer enable
//Bits 7:4 control the wait states therefore only 0xF wait states are available.

//Choose only one of the following for generating internal Wait States.
// SMCR5 = 0x0004; //8-bit data width/External/Big Endian/1 wait states
// SMCR5 = 0x0014; //8-bit data width/External/Big Endian/1 wait states
// SMCR5 = 0x0024; //8-bit data width/External/Big Endian/2 wait states
// SMCR5 = 0x0034; //8-bit data width/External/Big Endian/3 wait states
// SMCR5 = 0x0044; //8-bit data width/External/Big Endian/4 wait states
SMCR5 = 0x0035; //16-bit data width/External/Big Endian/3 wait states
// 15:14 = Reserved = b00; Reserved bits.
// 13:12 = ASC = b00; Address Setup time Cycles - ASC. Setup time = 0.
// 11:9 = TWS = b000; Trailing Wait States - TWS. = 0.
// 8 = Reserved = b0; Reserved bits
// 7:4 = WaitStates = b0011; Wait States = 3 wait states.
// 3 = END = b0; CPU is in big endian mode (in read mode)|
// 2 = MLOC = b1; Memory location - is on the Expansion bus
// 1:0 = DW = b01; Data width is 16-bit data

// Memory Map setup
// added to the low level init file with the memory mapping code
// activate Expansion bus at 0x00500000 set size to 512KB
MCBAHR2 = 0x0050; //EBM RAM base addr at 0x00500000

// 31:16 = Reserved = x0000; Reserved bits
// 15:0 = Address[31:16] = x0050; Base Address bits 31-16
MCBALR2 = 0x0050; // Size of 512KB

// 31:16 = Reserved = x0000; Reserved bits
// 15 = Address[15] = b0; Base Address bits 15
// 14:10 = Reserved = b00000; Reserved bits
// 9 = AW = b0; Auto wait on write, disabled - write operation is completed in one cycle
// 8 = Reserved = b0; Reserved bits
// 7:4 = Blocksize = b0101; Block size is 512KBytes with CPU address bus lines compared Address[32:19]
// 3 = Reserved 0 = b0; Reserved bits - Must be set to 0
// 2 = Reserved = b0; Reserved bits
// 1 = RONLY = b0; Read Only Protection
// 0 = PRIV = b0; Privilege protection

}

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Haixiao Weng
    Posted by Haixiao Weng
    on Mar 16 2012 20:04 PM
    Genius9565 points

    This is a very old device. I will look for the expert on this device next week.

    Haixiao

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prasad Go
    Posted by Prasad Go
    on Apr 05 2012 08:06 AM
    Prodigy95 points

    Any update on this?

    Thanks

    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