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.

RM48L952: Abort Exception on SDRAM misaligned accesses

Part Number: RM48L952

Hi,

I have noticed that while trying to read 32bit data from a external 64MB SDRAM (Alliance AS4C32M16SM) an abort exception is triggered in certain situations.

When I try to read 4-byte data from the SDRAM, based on a non-4byte alligned address, from the address 0x80800000 throughout the end of the memory the error occurs.

If I read the from memory on addresses up to 0x807FFFFC I can read 32bit data with no problems. However, starting on address 0x80800000 I can only read 32bit on a 4byte address interval. If I try to read the position 0x80800000 it reads OK, but if I try 0x80800001, 0x80800002 and 0x80800003 an abort exception is triggered. The read access to 0x80800004 is OK and so on. This behavior is repeated through the end of the memory.

Executing the following code the exception can be reproduced (the RM is on silicon revision D)

--------------------------------------------------------------------------------

uint32_t *sdram_ptr;
uint32_t var_test;

sdram_ptr = (uint32_t *)0x80000000;
var_test = *sdram_ptr; /* Read OK */
sdram_ptr = (uint32_t *)0x80000001;
var_test = *sdram_ptr; /* Read OK */
sdram_ptr = (uint32_t *)0x80000002;
var_test = *sdram_ptr; /* Read OK */
sdram_ptr = (uint32_t *)0x80000003;
var_test = *sdram_ptr; /* Read OK */
sdram_ptr = (uint32_t *)0x80000004;
var_test = *sdram_ptr; /* Read OK */


sdram_ptr = (uint32_t *)0x80800000;
var_test = *sdram_ptr; /* Read OK */
sdram_ptr = (uint32_t *)0x80800001;
var_test = *sdram_ptr; /* Triggers an abort exception*/
sdram_ptr = (uint32_t *)0x80800002;
var_test = *sdram_ptr; /* Triggers an abort exception*/
sdram_ptr = (uint32_t *)0x80800003;
var_test = *sdram_ptr; /* Triggers an abort exception*/
sdram_ptr = (uint32_t *)0x80800004;
var_test = *sdram_ptr; /* Read OK */

--------------------------------------------------------------------------------

Can anyone point me out on a direction on how to solve this issue?

Thanks in advance

Nilton Armstrong