I am using gpmc mode in am3359 microprocessor. in that where should i assign values to address & data bus.... what are the registers i have to handle...
Thank you
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.
I am using gpmc mode in am3359 microprocessor. in that where should i assign values to address & data bus.... what are the registers i have to handle...
Thank you
Hi,
If you are accessing NOR/SRAM type of device there are no registers to use - you simply read/write to a memory location.
Thank you for your reply...
We are using SRAM only. Can you please tell me how to read/write in that.
What software are you using? What is the SRAM device part number? Please post the GPMC_CONFIG[1:7] register values.
I'm using ubuntu 14.04 and the AM335x EVM with ARMv7 Processor..
GPMC_CONFIG1 = 0x00000000
GPMC_CONFIG2 = 0x00000300
GPMC_CONFIG3 = 0x00000000
GPMC_CONFIG4 = 0x00000301
GPMC_CONFIG5 = 0x00020003
GPMC_CONFIG6 = 0x00000000
GPMC_CONFIG7 = 0x000000f41
SRAM part no - CY62256LL
I think you have wrong settings for registers 2 and 4. You have no write access settings, and your read cycle is only 3 GPMC clocks. As the GPMC clock is 100MHz, this would give you only about 33ns cycle time. According to register 7 settings your SRAM starts from 0x100_0000.
See sections 7.1.3.3.10.3.1 and 7.1.3.3.10.3.2 in the AM335X TRM Rev. K for timings of your type of device.
Thank you for your reply,
we will change the configuration according to you and we are new for arm processor... so can you please tell me how to write some values to SRAM...
The SRAM is directly addressable over the GPMC. For example if you want to write 0x55 to address 0x100_0000 it's simply something like:
0x100_0000 = 0x55
Thank you,
I am using 256K SRAM, for that is seperate mmap required ? then what is the end address i will use... ?
Your start address seems to be 0x100_0000, so your end address would be 0x103_FFFF.
Thank you so much sir,
This conversation is very useful for me... i will try that...
Best regards,
Sakthi
dear sir,
I used the below code. while reading i got the output value as 80 but my expected value is 25. what was the wrong i made in this... Can you please explain any other option for this...
//**********************************************************************************************************
static volatile uint8_t* srambus = (uint8_t*) mmap(NULL,0x0103ffff- 0x01000000, PROT_READ | PROT_WRITE, MAP_SHARED, /dev/mem,0x01000000);
printf("srambus - %08x\n",srambus);
*(srambus + 1) = 0x25;
printf("byte at sram address %08x: %x\n", srambus + 1 , *(srambus + 1 ));
//***********************************************************************************************
OUTPUT:
srambus - 402e5000
byte at sram address 402e5001: 80
Thank you,
Best regards
sakthi
I'm sorry, I am not a SW expert, but first of all you should verify your GPMC timings with an oscilloscope.
Thank you for your reply,
I will follow yoursuggestions... Can send me some contact detail for software people...
Best regards
Sakthi
Dear sir,
According to your instructions we have updated the register values as mentioned below
GPMC_CONFIG2 = 0x00030301;
GPMC_CONFIG4 = 0x03010301;
you just check and let us know whether its correct or not.
we understood about start address,
but you told us end address = 0x103_FFFF for 256K SRAM. Can you please help us in calculating the end address
Regards
sakthi
0x4_0000 = 262 144 = 256 *1024 bytes. So if start address is 0x100_0000 then end address will be 0x103_FFFF.
About the timings:
GPMC_CONFIG2 = 0x00030301 means that CSWROFFTIME = CSRDOFFTIME = 3 clock cycles, meaning that the entire CS time is 30ns. Your SRAM has 70ns access time as far as I can remember. How do you expect to access it in 30ns?
Yes, I agree with you... Don't mistake me... we are beginners...
Thanks for your reply....
Hi,
GPMC_CONFIG2 = 0x00070700
This is the configuration we are using and then we are checking the gpmc_csn0 pin with CRO , but we are getting output as high pulse.There is no change in CSRDOFFTIME & CSWROFFTIME.
How to check the gpmc_csn0 pin with CRO before connecting an external memory ?
Thank you,
You cannot get a high CS pulse. You need to measure the time from CS falling edge to CS rising edge. I don't know what you mean by CRO.
Thank you sir...
CRO - Cathode Ray Oscilloscope ...
Now we are getting CS falling edge to CS rising edge....
Regards,
Sakthi