This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPMC interface commend\ address\ data

Other Parts Discussed in Thread: AM3358

Hi:

I have a question about the GPMC interface need to ask you. There are three registers,which are GPMC_NAND_COMMAND_i, GPMC_NAND_ADDRESS_i, GPMC_NAND_DATA_i. Three registers are described as follows:

I use GPMC interface to access a NAND flash (GPMC_CSn0)and a NOR flash(GPMC_CSn0).

I want to know the command ,address and data of NOR- related are also to the above three registers ‘s location? Why register name has a NAND, NAND Is it special?Where and Nor-related address, data, command should be placed?

thanks.

  • Hi Xiangtian,

    You say that you are accessing NAND and NOR both at GPMC_CSn0. Is this a typo? You should know that this is not possible, they must be at different chip selects.

    The three registers you mention are necessary only for NAND access, because NAND memories use a different interface over the GPMC - they receive commands, address and data over the GPMC data lines. For NOR access these registers are not used. You can access both NOR and NAND over the GPMC, but as mentioned above they  must be at different chip selects. NOR memories are addressed over the GPMC address lines (or address/data lines if AD-mux mode is used) and data is exchanged over the GPMC data lines. NOR access is simply a read/write to a memory location.

  • Hi:

       I'm sorry, I described the wrong that

    I use GPMC interface to access a NAND flash (GPMC_CSn0)and a NOR flash(GPMC_CSn0).

    I use GPMC interface to access a NAND flash (GPMC_CSn0)and a NOR flash(GPMC_CSn1).

     I do not know how to read and write  NOR  using GPMC.For example, I want to write data  go inside a NOR cell in an address.After GPMC interface initialization is complete, how can I do? How to  write command is issued?  How to adress is issued? How to data  is issued?  There are not registers of NOR- related.How to address lines, data lines, and command line  link AM3358  internal ?How do I write a program? 

  • There is nothing to program after GPMC initialization. Writing to an address in NOR is simply writing to the NOR address. The GPMC handles everything else automatically.

  • HI:

     Thank you for your reply before.

    I would like to confirm that my method of operation is correct or not.

    I assigned GPMC_CSn1 base address is 0x10000000, size is 16M. If I want to write data 0xAB into an address(0x01) unit of NOR flash . I wrote a program that need you help me confirm right or not. Comment is my understanding,  need you help me confirm right or not

    U32 sysbase;    /* This variable is used to indicate the start address of the FLASH, It also represents my base address assigned GPMC_CSn1. */

    U8 rd_value;

    #define  SysADDR8(sysbase, offset)    ((volatile U8*)(sysbase)+(offset))

    *SysAddr8(0x10000000, 0x01) = 0xAB; /* When AM3358 execute this line of code , GPMC_CSn1 is asserted automatically ,write command line is asserted automatically and then de-asserted .Data 0XAB is automatically put on data bus,address 0x01 is automatically put on address bus.  Right or wrong? */

    In other words, GPMC_CSn1’s base address is corresponding first address of NOR flash.

    Second question: Read operation

    Rd_value=*SysAddr8(0x10000000, 0x01); /*read the value of 0x1 address cell of NOR,and put the value into the variable of rd_value */

    Read operation right or not.

     

  • Yes, this is correct.

  • Hi: Biser

    Thank for your reply.

    I used to Figure 7-4 connect an external NOR .Now I read data from an address unit (0x01) of NOR Once every millisecond ,I can see the CS signal is pulled low 310ns by Oscilloscope,and OE signal is also  pulled low 310ns .This proves that I have been successful initialization or not? Can I think that address line should appear 0x01 when CS and OE are pulled low 310ns.If you do not read, what should the state address lines? 

    #if 1
    while(size)
    {
    *rxData = (*(volatile unsigned char*)(NOR_baseAddr));
    rxData++;
    size--;
    }
    #endif

    When I use the above code to read a cell, I can see the CS is pulled low。

    #if 1
    size=50;
    while(size)
    {
    *rxData = (*(volatile unsigned char*)(NOR_baseAddr+size));
    size--;
    }
    #endif

      But when I uabove code to read several successive unit, I cannot see the CS is pulled low.Why???

    #if 1
    size=50;
    while(size)
    {
    *rxData = (*(volatile unsigned char*)(NOR_baseAddr)+size);
    size--;
    }
    #endif

      But when I uabove code to read several successive unit, I cannot see the CS is pulled low.Why???

    If I want to read data from several successive units, how can I write code?Why continuous read  there is no  signal output??? Why I read continuously without any change in the address line???