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.
The 1st spin of our custom board (based on the BeagleBone Black) used the AM3352 with a single Micron MT41K256M16HA-125 and we've already successfully ported U-Boot/SPL and Linux to that.
The 2nd spin is using the a single Micron MT41K256M16TW-107 as a BoM modification, layout has not been changed.
I've been trying to discover the DDR timings for the 2nd spin and unfortunately I'm seeing the "Data Changing Everywhere!" symptom as described here.
I'm attempting to configure the RAM to 6-6-6 800MT/s @ 400MHz. Using the datasheet for MT41K256M16 I came up with the values below:
Memory datasheet symbol | Memory Datasheet value | unit |
tCK | 2.5 | ns |
tRP | 15 | ns |
tRCD | 15 | ns |
tWR | 15 | ns |
tRAS | 37.5 | ns |
tRC | 52.5 | ns |
tRRD | 10 | ns |
tWTR | 10 | ns |
tXP | 3 | tCK |
tAOND | 2 | tCK |
tXSNR | 170 | ns |
tXSRD | 512 | tCK |
tRTP | 10 | ns |
tCKE | 3 | tCK |
tRFC | 160 | ns |
and from the CAD:
Parameters | ||
DDR clock frequency | 400 | MHz |
PHY_INVERT_CLKOUT | 1 | |
Trace Length (inches) | ||
Byte 0 | Byte 1 | |
DDR_CK trace | 0.823 | 0.823 |
DDR_DQSx trace | 1.064 | 0.969 |
Intermediate values (per byte lane) | ||
WR DQS | 7B | 7D |
RD DQS | 40 | 40 |
RD DQS GATE | F6 | F2 |
Seed values used in CCS code | ||
DATAx_PHY_RD DQS_SLAVE_RATIO | 40 | |
DATAx_PHY_FIFO_WE_SLAVE_RATIO | F4 | |
DATAx_PHY_WR DQS_SLAVE_RATIO | 7C | |
Register value | ||
CMDx_PHY_CTRL_SLAVE_RATIO | 100 |
GEL file:
//****************************************************************** //EMIF parameters //****************************************************************** // DDR3 400MHz settings -- Needs modified #define ALLOPP_DDR3_READ_LATENCY 0x07 //RD_Latency = (CL + 2) - 1 //400MHz settings for 4Gb device -- Needs modified #define ALLOPP_DDR3_SDRAM_TIMING1 0x0AAAE51B #define ALLOPP_DDR3_SDRAM_TIMING2 0x24437FDA #define ALLOPP_DDR3_SDRAM_TIMING3 0x000003FF #define ALLOPP_DDR3_SDRAM_CONFIG 0x61C05332 //termination = 1 (RZQ/4) //dynamic ODT = 2 (RZQ/2) //SDRAM drive = 0 (RZQ/6) //CWL = 0 (CAS write latency = 5) //CL = 4 (CAS latency = 6) //ROWSIZE = 6 (15 row bits) //PAGESIZE = 2 (10 column bits) #define ALLOPP_DDR3_REF_CTRL 0x00000C30 //400 * 7.8us = 0xC30 #define ALLOPP_DDR3_ZQ_CONFIG 0x50074BE4
Summary:
Please advise.
EDIT: Attached datasheet.4Gb_DDR3L.pdf
Unfortunately I still see the same problem.
Thank you for pointing that out though, Dwarakesh - I didn't even notice the other sheets!
The ALLOPP_DDR3_SDRAM_TIMING are now almost identical to Rev A, in fact they actually work on the Rev A board but I have to use different _PHY_ constants:
# This works for Rev A... #define CMD_PHY_CTRL_SLAVE_RATIO 0x80 #define CMD_PHY_INVERT_CLKOUT 0x0 #define DATA_PHY_RD_DQS_SLAVE_RATIO 0x39 #define DATA_PHY_FIFO_WE_SLAVE_RATIO 0x97 //RD DQS GATE #define DATA_PHY_WR_DQS_SLAVE_RATIO 0x41 #define DATA_PHY_WR_DATA_SLAVE_RATIO 0x7B //WRITE DATA #define ALLOPP_DDR3_READ_LATENCY 0x07 //RD_Latency = (CL + 2) - 1 #define ALLOPP_DDR3_SDRAM_TIMING1 0x0AAAD4DB #define ALLOPP_DDR3_SDRAM_TIMING2 0x266B7FDA #define ALLOPP_DDR3_SDRAM_TIMING3 0x501F867F #define ALLOPP_DDR3_SDRAM_CONFIG 0x61C05332
I can't seem to get the slave ratio program to return anything but zeros for Rev B, even if I try the Rev A seed values. In fact if I do that then the memory browser just shows all zeros as well.
So using what we've discussed...
# This is what I have so far for Rev B... #define CMD_PHY_CTRL_SLAVE_RATIO 0x100 #define CMD_PHY_INVERT_CLKOUT 0x1 #define DATA_PHY_RD_DQS_SLAVE_RATIO 0x40 #define DATA_PHY_FIFO_WE_SLAVE_RATIO 0xF4 //RD DQS GATE #define DATA_PHY_WR_DQS_SLAVE_RATIO 0x7C #define DATA_PHY_WR_DATA_SLAVE_RATIO 0x80 //WRITE DATA #define ALLOPP_DDR3_READ_LATENCY 0x07 //RD_Latency = (CL + 2) - 1 #define ALLOPP_DDR3_SDRAM_TIMING1 0x0AAAD4DB #define ALLOPP_DDR3_SDRAM_TIMING2 0x266B7FDA #define ALLOPP_DDR3_SDRAM_TIMING3 0x501F843F #define ALLOPP_DDR3_SDRAM_CONFIG 0x61C05332
With the above I still see the same "data changing" in memory browser...
One thing that I think is strange is that the seed values from the RatioSeed spreadsheet don't work and aren't used for Rev A, I would've thought they'd be the same between the two boards if layout hadn't changed? When I originally did the bringup for Rev A I just used the BeagleBone Black seed values from the tutorial and they worked.
Now when I'm trying Rev B, I've tried both the seed values from Rev A and also the ones provided by the RatioSeed spreadsheet. If I use Rev A seeds values I see all zeros in the memory browser, if I use the RatioSeed spreadsheet values then I see the data changing as per the GIFs previously posted.
I'm at a loss now. Could this be an issue with impedance matching on Rev B? Or am I missing something?
Hi,
We all did that mistake. I was referring to the wrong sheet yesterday :) . Biser is the right person to answer, since he is an expert in hardware, but from what I have very limited knowledge, the Seed Ratio spread sheet should be filled with the trace length in your actual layout. If the layout has changed between revA and revB, you might need to provide the correct changed values and by trying out various other Boards' may not help.
Stephen, a lot of times when the software leveling algorithm returns zeros, it is because the processor is not in supervisor mode. I have seen this quite often with CCS, especially ver 6.x and later. CCS will put the processor in user mode when loading a program.
After loading the file, ensure that the processor is in supervisor mode before executing the software leveling algorithm by executing the script Script->default->AM335xStartState. You can check the processor mode in the bottom right corner of the CCS Window as shown below
Regards,
James
Hi James, thank you for the suggestion however it appears that supervisor mode is activated correctly without the need to run a script.
I've uploaded a complete screencast of the CCS session below (5MB animated GIF) in case you spot anything else? In the screencast I use the seed values from the SeedRatio spreadsheet, although I see the same behaviour if I use the seed values from rev A. I also see the same behaviour if I use the timing registers from rev A or, as in the screencast, the timing registers provided by Biser. I've also tried all combinations of the above to the same effect.
When I follow the exact same process for a rev A board, the levelling works correctly (with rev A seed values entered into GEL file and console) either with the rev A timing registers or with the timing registers provided by Biser.
Stephen, can you try increasing your READ_LATENCY by 1. If it still doesn't work, try by 2
Regards,
James
Paul, that shouldn't be an issue. We support a DDR clock frequency of 400MHz (ie, 800M T/s). The minimum speed grade that we support for 400MHz operation is DDR-1600, which both of your devices meet.
Any results of the read_latency tests?
Regards,
James