The SAMA5D24/BGA256/LPDDR3-SDRAM set is part of a larger test board built
on an 8-layer PCB. The board features a SAMA5D24/BGA256 MPU and one 8-Gbit(4) Micron LPDDR3-SDRAM device (Part No.:
MT52L256M32D1PF-107WT). The DDR clock runs at 166 MHz.
Table 4-60. MPDDRC_MD Register SettingsField | Description | Setting | Setting Details |
---|
MD | Memory Device | 5 | LPDDR3-SDRAM |
DBW(1) | Data Bus Width | 0 | Data bus width is 32 bits |
Table 4-61. MPDDRC_CR Register SettingsField | Description | Setting | Setting Details |
---|
NC | Number of Column Bits | 1 | 10 bits to define the column number |
NR | Number of Row Bits | 3 | 14 bits to define the row number |
CAS | CAS Latency | 3 | LPDDR3 CAS Latency 3 |
DLL | Reset DLL | (unchanged) | Not available for LPDDR3-SDRAM |
DIC_DS | Output Driver Impedance Control (Drive Strength) | (unchanged) | Not available for LPDDR3-SDRAM |
DIS_DLL | Disable DLL | (unchanged) | Used only during power-up sequence |
ZQ | ZQ Calibration | (unchanged) | Used only during power-up sequence |
OCD | Off-chip Driver | (unchanged) | Not available for LPDDR3-SDRAM |
DQMS | Mask Data is Shared | 0 | DQM is not shared with another
controller |
ENRDM | Enable Read Measure | 0 | DQS/DDR_DATA phase error correction is
disabled |
LC_LPDDR1 | Low-cost Low-power DDR1 | (unchanged) | Not available for LPDDR3-SDRAM |
NB | Number of Banks | 1 | 8 banks |
NDQS | Not DQS | (unchanged) | Not available for LPDDR3-SDRAM |
DECOD | Type of Decoding | 0 | Sequential |
UNAL | Support Unaligned Access | 1 | Unaligned access is supported |
Table 4-62. MPDDRC_TPR0 Register SettingsField | Description | Setting(2) | Setting Details |
---|
TRAS | Active to Precharge Delay | 42 ns | – |
TRCD | Row to Column Delay | max (18 ns, 3 ck) | – |
TWR | Write Recovery Delay | max (15 ns, 3 ck) | – |
TRC | Row Cycle Delay | 60 ns | – |
TRP | Row Precharge Delay | max (18 ns, 3 ck) | – |
TRRD | Active BankA to Active BankB | max (10 ns, 2 ck) | – |
TWTR | Internal Write to Read Delay | max (8 ns, 4 ck) | – |
TMRD | Load Mode Register Command to Activate or Refresh
Command | max (14 ns, 10 ck) | – |
Table 4-63. MPDDRC_TPR1 Register SettingsField | Description | Setting(2) | Setting Details |
---|
TRFC | Row Cycle Delay | 210 ns | – |
TXSNR | Exit Self-refresh Delay to Non-Read Command | 220 ns | – |
TXSRD | Exit Self-refresh Delay to Read Command | (unchanged) | Not available for LPDDR3-SDRAM |
TXP | Exit Power-down Delay to First Command | max (8 ns, 2 ck) | – |
Table 4-64. MPDDRC_TPR2 Register SettingsField | Description | Setting(2) | Setting Details |
---|
TXARD | Exit Active Power-down Delay to Read Command in Mode “Fast
Exit” | (unchanged) | Not available for LPDDR3-SDRAM |
TXARDS | Exit Active Power-down Delay to Read Command in Mode “Slow
Exit” | (unchanged) | Not available for LPDDR3-SDRAM |
TRPA | Row Precharge All Delay | 18 ns | Equivalent to tRPAB |
TRTP | Read to Precharge | max (8 ns, 4 ck) | – |
TFAW | Four Active Windows | max (50 ns, 8 ck) | – |
Table 4-65. MPDDRC_LPDDR23_LPR Register SettingsField | Description | Setting | Setting Details |
---|
BK_MASK_PASR | Bank Mask Bit/PASR | 0 | Refresh is enabled |
SEG_MASK | Segment Mask Bit | 0 | Segment is refreshed |
DS | Drive Strength | 2 | 40 ohm typical |
Table 4-66. MPDDRC_RD_DATA_PATH Register SettingsField | Description | Setting | Setting Details |
---|
SHIFT_SAMPLING | Shift Sampling Point of Data | 2 | Sampling point is shifted by two
cycles |
Table 4-67. MPDDRC_IO_CALIBR Register SettingsField | Description | Setting | Setting Details |
---|
RDIV | Resistor Divider, Output Driver Impedance | 4 | LPDDR3 serial impedance line = 57
ohms |
TZQIO | IO Calibration | 101 | TZQIO = (DDRCK × 600e-9) + 1 |
EN_CALIB | Enable Calibration | (unchanged) | Not available for LPDDR3-SDRAM |
Table 4-68. MPDDRC_RTR Register SettingsField | Description | Setting | Setting Details |
---|
COUNT(3) | MPDDRC Refresh Timer Count | 649 | Value needs to be computed |
ADJ_REF | Adjust Refresh Rate | 0 | Adjust refresh rate is not enabled |
REF_PB | Refresh Per Bank | 0 | Refresh all banks during autorefresh
operation |
Note:
- If using one 32-bit data bus width SDRAM device or two 16-bit devices, set the Data
Bus Width to 32 bits (DBW = 0). If only one 16-bit data bus width SDRAM device is
used, set the Data Bus Width to 16 bits (DBW = 1).
- If timing values are given in
nanoseconds, they must be converted in clock cycles and rounded up.
tCYCLES = tns/tCK, where tCYCLES is
the timing value in clock cycles, tns is the timing value in nanoseconds
and tCK is the DDR clock period.
Eg: If fCK =
166 MHz, then tCK = 1/fCK = 6 ns
If
tns = 35 ns, then tCYCLES = 35/6 = 6 clock
cycles
- The value in the COUNT field needs to
be computed.
COUNT = tREFI/tCK
For tREFI = 7.8 μs and tCK = 6 ns results in
COUNT = 1300
tREFI can also be calculated if the
Refresh Window [ms] and Refresh Cycles are given (in the SDRAM data sheet).
tREFI [μs] = (Refresh Window [ms]/Refresh
Cycles)*fCK [MHz]*1000
If Refresh Window = 64 ms,
Refresh Cycles = 8192 and fCK = 166 MHz,
then COUNT
= (64/8192)*166*1000 = 1297
- The memory controller is unable to
use the whole capacity of the 8-Gbit memory device (supports 4 Gbits maximum). An
8-Gbit device was mounted for procurement facility reasons. With the current
settings, the usage of half of this capacity is achievable.
Table 4-69. SAMA5D24/BGA256/LPDDR3-SDRAM Register SettingsRegister Name | Register Address | Contents Value |
---|
MPDDRC_MD | 0xF000C020 | 0x00000005 |
MPDDRC_CR | 0xF000C008 | 0x0090053D |
MPDDRC_TPR0 | 0xF000C00C | 0xA423A337 |
MPDDRC_TPR1 | 0xF000C010 | 0x02002523 |
MPDDRC_TPR2 | 0xF000C014 | 0x00094400 |
MPDDRC_LPDDR23_LPR | 0xF000C028 | 0x02000000 |
MPDDRC_RD_DATA_PATH | 0xF000C05C | 0x00000002 |
MPDDRC_IO_CALIBR | 0xF000C034 | 0x00876504 |
MPDDRC_RTR | 0xF000C004 | 0x00000289 |
Important: For LPDDR2/LPDDR3
devices, certain sequences shall be used to power off these devices. Uncontrolled power-off
sequences are destructive and can be applied only up to 400 times in the life of the
device. Make sure to respect those sequences to ensure a long functional life for your
system. Refer to the manufacturer’s data sheet for the proper way to power off the devices.
Typically these rely upon an early detection of power failure and achieve a timely
power-off sequence through the execution of a high priority interrupt.